2

Closed

error: invalid conversion from ‘int’ to ‘std::_Ios_Openmode’

description

CharLS from SVN does not build:
 
Scanning dependencies of target CharLS
[ 10%] Building CXX object CMakeFiles/CharLS.dir/header.cpp.o
[ 20%] Building CXX object CMakeFiles/CharLS.dir/interface.cpp.o
[ 30%] Building CXX object CMakeFiles/CharLS.dir/jpegls.cpp.o
Linking CXX static library libCharLS.a
[ 30%] Built target CharLS
Scanning dependencies of target charlstest
[ 40%] Building CXX object CMakeFiles/charlstest.dir/test/main.cpp.o
/home/mathieu/Software/charls/trunk/charls/test/main.cpp: In function ‘void TestDecodeFromStream(char*)’:
/home/mathieu/Software/charls/trunk/charls/test/main.cpp:230: error: invalid conversion from ‘int’ to ‘std::_Ios_Openmode’
/home/mathieu/Software/charls/trunk/charls/test/main.cpp:230: error: initializing argument 2 of ‘typename _Traits::pos_type std::basic_streambuf<_CharT, _Traits>::pubseekpos(typename _Traits::pos_type, std::_Ios_Openmode) [with _CharT = char, _Traits = std::char_traits<char>]’
/home/mathieu/Software/charls/trunk/charls/test/main.cpp: In function ‘void TestEncodeFromStream()’:
/home/mathieu/Software/charls/trunk/charls/test/main.cpp:247: warning: deprecated conversion from string constant to ‘char
/home/mathieu/Software/charls/trunk/charls/test/main.cpp:249: warning: deprecated conversion from string constant to ‘char

/home/mathieu/Software/charls/trunk/charls/test/main.cpp:250: warning: deprecated conversion from string constant to ‘char*’
/home/mathieu/Software/charls/trunk/charls/test/main.cpp:251: warning: deprecated conversion from string constant to ‘char
/home/mathieu/Software/charls/trunk/charls/test/main.cpp:252: warning: deprecated conversion from string constant to ‘char

make[2]: *** [CMakeFiles/charlstest.dir/test/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/charlstest.dir/all] Error 2
make: *** [all] Error 2
 
 
Thanks !
Closed Dec 28, 2014 at 11:23 AM by vbaderks
The latest "master" compiles ok on Linux (tested on Ubuntu)

comments

jdv wrote Jan 6, 2011 at 7:59 PM

That is correct. There is some experimentation going on on the trunk build. Announcements will be made when trunk is portable again.