aleuly / ifcplusplus

Automatically exported from code.google.com/p/ifcplusplus
Other
0 stars 0 forks source link

ifstream(wchar_t *, ..) is not standard C++, doesn't compile on Linux #38

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. SVN checkout
2. Build according to instructions
3. Fail on errors

What is the expected output? What do you see instead?

What version of the product are you using? On what operating system?
Fedora 20, SVN trunk version as of today

Please provide any additional information below.
[alexhultman@localhost build]$ make
[  3%] Built target carve
[  3%] Building CXX object 
IfcPlusPlus/CMakeFiles/IfcPlusPlus.dir/src/ifcpp/reader/IfcPPReaderSTEP.cpp.o
/home/alexhultman/ifcplusplus-read-only/IfcPlusPlus/src/ifcpp/reader/IfcPPReader
STEP.cpp: In member function ‘void IfcPPReaderSTEP::loadModelFromFile(const 
wstring&, std::tr1::shared_ptr<IfcPPModel>&)’:
/home/alexhultman/ifcplusplus-read-only/IfcPlusPlus/src/ifcpp/reader/IfcPPReader
STEP.cpp:111:60: error: no matching function for call to 
‘std::basic_ifstream<char>::basic_ifstream(const wchar_t*, const openmode&)’
  std::ifstream infile(file_path.c_str(), std::ifstream::in );
                                                            ^
/home/alexhultman/ifcplusplus-read-only/IfcPlusPlus/src/ifcpp/reader/IfcPPReader
STEP.cpp:111:60: note: candidates are:
In file included from 
/home/alexhultman/ifcplusplus-read-only/IfcPlusPlus/src/ifcpp/reader/IfcPPReader
STEP.cpp:18:0:
/usr/include/c++/4.8.3/fstream:483:7: note: std::basic_ifstream<_CharT, 
_Traits>::basic_ifstream(const string&, std::ios_base::openmode) [with _CharT = 
char; _Traits = std::char_traits<char>; std::string = std::basic_string<char>; 
std::ios_base::openmode = std::_Ios_Openmode]
       basic_ifstream(const std::string& __s,
       ^
/usr/include/c++/4.8.3/fstream:483:7: note:   no known conversion for argument 
1 from ‘const wchar_t*’ to ‘const string& {aka const 
std::basic_string<char>&}’
/usr/include/c++/4.8.3/fstream:467:7: note: std::basic_ifstream<_CharT, 
_Traits>::basic_ifstream(const char*, std::ios_base::openmode) [with _CharT = 
char; _Traits = std::char_traits<char>; std::ios_base::openmode = 
std::_Ios_Openmode]
       basic_ifstream(const char* __s, ios_base::openmode __mode = ios_base::in)
       ^
/usr/include/c++/4.8.3/fstream:467:7: note:   no known conversion for argument 
1 from ‘const wchar_t*’ to ‘const char*’
/usr/include/c++/4.8.3/fstream:453:7: note: std::basic_ifstream<_CharT, 
_Traits>::basic_ifstream() [with _CharT = char; _Traits = 
std::char_traits<char>]
       basic_ifstream() : __istream_type(), _M_filebuf()
       ^
/usr/include/c++/4.8.3/fstream:453:7: note:   candidate expects 0 arguments, 2 
provided
make[2]: *** 
[IfcPlusPlus/CMakeFiles/IfcPlusPlus.dir/src/ifcpp/reader/IfcPPReaderSTEP.cpp.o] 
Error 1
make[1]: *** [IfcPlusPlus/CMakeFiles/IfcPlusPlus.dir/all] Error 2
make: *** [all] Error 2
[alexhultman@localhost build]$

Original issue reported on code.google.com by alexhult...@gmail.com on 3 Apr 2015 at 4:18

GoogleCodeExporter commented 9 years ago

Original comment by fabian.g...@gmail.com on 3 Apr 2015 at 4:39

GoogleCodeExporter commented 9 years ago
Where do we go from here? I want to evaluate this lib but it doesn't compile. 
Should I try and fix this or is someone working on it already?

Original comment by alexhult...@gmail.com on 6 Apr 2015 at 10:22