fTetWild icon indicating copy to clipboard operation
fTetWild copied to clipboard

Compile fTetWild with MinGW

Open hph73 opened this issue 3 years ago • 3 comments

I need to compile fTetWild with mingw on windows but got the following errors. I believe some settings need to be done for geogram. Any clue?

Scanning dependencies of target geogram_third_party [ 22%] Building C object geogram/src/lib/geogram/third_party/CMakeFiles/geogram_third_party.dir/LM7/libmeshb7.c.obj gcc.exe: error: /D_SECURE_SCL=0: No such file or directory gcc.exe: error: /GS-: No such file or directory gcc.exe: error: /Ox: No such file or directory gcc.exe: error: /nologo: No such file or directory gcc.exe: error: /MP: No such file or directory gcc.exe: error: /wd4275: No such file or directory gcc.exe: error: /wd4996: No such file or directory gcc.exe: error: /wd4512: No such file or directory gcc.exe: error: /bigobj: No such file or directory gcc.exe: error: /W3: No such file or directory gcc.exe: error: /wd4245: No such file or directory gcc.exe: error: /wd4389: No such file or directory

hph73 avatar Apr 27 '21 12:04 hph73

My guess is that the cmake (of geogram) uses if(WIN32) instead of detecting the compiler. I recognize all the flags there (`nologo', 'bigobj' etc) as windows specific flags.

Unfortunately, I don't know how to help. Maybe you can (on the top cmake) set WIN32 to false?

teseoch avatar Apr 28 '21 17:04 teseoch

I updated the geogram version to v1.7.6 and also added set(VORPALINE_PLATFORM MinGW-x86_64-w64 CACHE STRING "" FORCE). This time geogram failed at linking. Error message is shown below.

[ 82%] Linking CXX static library ..\..\..\..\lib\libgeogram.a
Error running link command: The system cannot find the file specified
mingw32-make[2]: *** [geogram\src\lib\geogram\CMakeFiles\geogram.dir\build.make:1841: lib/libgeogram.a] Error 2
mingw32-make[1]: *** [CMakeFiles\Makefile2:1197: geogram/src/lib/geogram/CMakeFiles/geogram.dir/all] Error 2
mingw32-make: *** [Makefile:162: all] Error 2

hph73 avatar May 01 '21 14:05 hph73

I also has problem with this libmeshb7.c file. The error is: [ 13%] Building C object geogram/src/lib/geogram/third_party/CMakeFiles/geogram_third_party.dir/LM7/libmeshb7.c.obj gcc.exe: fatal error: cannot specify '-o' with '-c', '-S' or '-E' with multiple files

freeNastran avatar Dec 31 '23 03:12 freeNastran