Closed sway913 closed 6 years ago
Thank you.
This problem is because there is no wstring version of fstream in MinGW.
Have you found any other problems as well?
G:/work/3D_opengl/depends/include/fpp.h:159:12: error: expected initializer before 'fppPreProcess'
int PREFIX fppPreProcess(REG(a0) struct fppTag );
^~~~~
H:\test\saba\viewer\Saba\GL\GLSLUtil.cpp: In function 'bool saba::PreprocessGLSL(std::__cxx11::string, saba::GLSLShaderLang, const string&, const saba::GLSLDefine&, const saba::GLSLInclude&, std::__cxx11::string)':
H:\test\saba\viewer\Saba\GL\GLSLUtil.cpp:521:14: error: 'FPPTAG_FILE_OPEN_EXT' was not declared in this scope
tag.tag = FPPTAG_FILE_OPEN_EXT;
^~~~~~~~
H:\test\saba\viewer\Saba\GL\GLSLUtil.cpp:521:14: note: suggested alternative: 'PIMAGE_FILE_HEADER'
tag.tag = FPPTAG_FILE_OPEN_EXT;
^~~~~~~~
PIMAGE_FILE_HEADER
H:\test\saba\viewer\Saba\GL\GLSLUtil.cpp:582:15: error: 'fppPreProcess' was not declared in this scope
auto ret = fppPreProcess((fppTag)tags.data());
^~~~~
H:\test\saba\viewer\Saba\GL\GLSLUtil.cpp:582:15: note: suggested alternative: 'OpenProcess'
auto ret = fppPreProcess((fppTag*)tags.data());
I can make sure that the library of FCPP is compiled successfully, because I can run fpp.exe, and it is also dependent on fpp.dll and libfpp.dll.a. I don't know why it's a mistake to compile Saba now.
in MinGW, we should replace #if _WIN32 to #if _WIN32 && defined(_MSC_VER)。 should not be used the fcpp at https://github.com/bagder/fcpp。Because the code doesn't match
I fixed this problem. Please try MinGW build again.
I tested it in the following environment.
[ 98%] Built target SabaViewer
Scanning dependencies of target saba_viewer
[ 99%] Building CXX object CMakeFiles/saba_viewer.dir/saba_viewer.cpp.obj
H:\test\saba\saba_viewer.cpp: In function 'int SabaViewerMain(const std::vector<std::__cxx11::basic_string~~~~~
make[2]: [CMakeFiles\saba_viewer.dir\build.make:63: CMakeFiles/saba_viewer.dir/saba_viewer.cpp.obj] Error 1
make[1]: [CMakeFiles\Makefile2:70: CMakeFiles/saba_viewer.dir/all] Error 2
make: *** [Makefile:83: all] Error 2
[100%] Linking CXX executable saba_viewer.exe CMakeFiles\saba_viewer.dir/objects.a(saba_viewer.cpp.obj):saba_viewer.cpp:(.text+0x2068): undefined reference to `saba::Viewer::Initialize(saba::Viewer::InitializeParameter const&, int, int)' collect2.exe: error: ld returned 1 exit status make[2]: [CMakeFiles\saba_viewer.dir\build.make:106: saba_viewer.exe] Error 1 make[1]: [CMakeFiles\Makefile2:70: CMakeFiles/saba_viewer.dir/all] Error 2 make: *** [Makefile:83: all] Error 2
I don't know this function.
saba::Viewer::Initialize(saba::Viewer::InitializeParameter const&, int, int)
The original code is this.
saba/viewer/Saba/Viewer/Viewer.h : 62
saba::Viewer::Initialize(const saba::Viewer::InitializeParameter&)
Please check that it has not been changed from the original source code.
I found that some function parameters are different from the MinGW header file type.