Closed thehoglet closed 6 years ago
Hi
Generally we use this project for building dependencies for the different MS Visual Studio versions and do not often use MINGW.
It looks like your build did not like the libcheck code. This is not a necessary dependency for libsbml.
We do know that a build with expat and mingw did work; you could perhaps try that - leaving out the check library.
The team member with most MINGW experience is currently on vacation but will follow up with you if the above does not work. Let us know.
Thanks
Sarah
Thanks for your suggestion. I tried leaving out the check library. The compilation proceeded much further this time but still failed:
C:\public\libSBML-dependencies-master\xerces-c\src\xercesc\util\MsgLoaders\Win32\Win32MsgLoader.cpp:176:44: error: invalid conversion from 'XMLCh* {aka short unsigned int*}' to 'wchar_t*' [-fpermissive]
wcsncpy(toFill, pBlock + 1, actualChars);
^
In file included from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/guiddef.h:148:0,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/winnt.h:628,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/windef.h:8,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/windows.h:69,
from C:\public\libSBML-dependencies-master\xerces-c\src\xercesc\util\MsgLoaders\Win32\Win32MsgLoader.cpp:26:
C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/string.h:141:12: note: initializing argument 1 of 'wchar_t* wcsncpy(wchar_t*, const wchar_t*, size_t)'
wchar_t *wcsncpy(wchar_t * __restrict__ _Dest,const wchar_t * __restrict__ _Source,size_t _Count) __MINGW_ATTRIB_DEPRECATED_SEC_WARN;
^~~~~~~
C:\public\libSBML-dependencies-master\xerces-c\src\xercesc\util\MsgLoaders\Win32\Win32MsgLoader.cpp:176:28: error: invalid conversion from 'const XMLCh* {aka const short unsigned int*}' to 'const wchar_t*' [-fpermissive]
wcsncpy(toFill, pBlock + 1, actualChars);
~~~~~~~^~~
In file included from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/guiddef.h:148:0,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/winnt.h:628,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/minwindef.h:163,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/windef.h:8,
from C:/PROGRA~1/MINGW-~1/X86_64~1.0-P/mingw64/x86_64-w64-mingw32/include/windows.h:69,
from C:\public\libSBML-dependencies-master\xerces-c\src\xercesc\util\MsgLoaders\Win32\Win32MsgLoader.cpp:26:
Unsurprisingly, the XML parser lib is not optional. Any ideas?
Thanks for your help with this.
It might surprise you, but even that xml parser is optional :) ... the dependencies package contains all three supported XML parsers. I would recommend, just compiling the expat one ... install to a desired location, and then configure libSBML with:
cmake -DWITH_LIBXML=OFF -DWITH_EXPAT=ON -DLIBSBML_DEPENDENCY_DIR=<install location> <other options> <libsbml source dir>
like sarah mentioned, the primary use for this repository is to make it easier building all dependencies for visual studio. For mingw it is probably easier just to compile the sources for the configuration you want by hunting down the source tarballs and compiling them using the gnumake build scripts contained therein.
Just as an aside, could you let us know, why you have the dependency on mingw?
libSBML is a dependency of GNU MCSim. MCSim requires its users to have a C++ compiler installed. On Windows an option is the Microsoft MSVC Build Tools, but it weighs in at over 2GB, which is excessive just to recompile a tiny command line tool. mingw (64-bit) at 400MB is a lightweight alternative.
Strictly speaking, I don't need to build libSBML with mingw. It never occurred to me scavenge the libSBML dependencies from their original sources.
Thanks for your help with this. I'll have a go building with expat later today.
My set-up is this:
Windows 10 Enterprise 64-bit mingw-w64: x86_64-7.2.0-posix-seh-rt_v5-rev1 CMAKE v3.10.0-rc5
I generate using MinGW Makefiles and default settings. Running mingw32-make, I get this compiler error:
I was curious so I commented out the offending typedef and tried again:
I also tried a
-U WIN32
compiler switch. It didn't help.Any idea what I'm doing wrong?