wildmeshing / fTetWild

Fast Tetrahedral Meshing in the Wild
https://yixin-hu.github.io/ftetwild.pdf
Mozilla Public License 2.0
384 stars 79 forks source link

FloatTetwild_bin.exe not built after running cmake #65

Open blue-gitty opened 8 months ago

blue-gitty commented 8 months ago

image

I have also tried the ./FloatTetWild_bin in the ftetwild directory, whats wrong here? Can anyone please help me execute the buildi succesfully?

blue-gitty commented 8 months ago

image

Here's the output after the build

Manurocker95 commented 7 months ago

image

I have also tried the ./FloatTetWild_bin in the ftetwild directory, whats wrong here? Can anyone please help me execute the buildi succesfully?

I got it working by using CMAKE-GUI, creating the Visual Studio solution, changing the C++ runtime libs to MT instead of MD, and it finally compiled. This was a complete mess...

blue-gitty commented 7 months ago

I got it working by using CMAKE-GUI, creating the Visual Studio solution, changing the C++ runtime libs to MT instead of MD, and it finally compiled. This was a complete mess...

Thank you for the response, but my Cmake GUI is throwing some error:


CMake Error at CMakeLists.txt:3 (project):
  Running

   'nmake' '-?'

  failed with:

   The system cannot find the file specified

CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
nonbasketless commented 4 months ago

I'm unable to build (can't find ",.lib") after a few hours of work. Any chance someone could just share the exe oh please please please? I have one for the original TetWild but could really use a faster version.

nonbasketless commented 4 months ago

Ok, my build failure was primarily because GMP is an absolute mess (at least on Windoze). For now working around GMP (might share later). After removing GMP:

I also had the MT/MD problem. I figured out the cause (by message printing and bisection): on Windows, IGL by default makes you use MD, contaminating everything downstream, but some other things are MT.

I fixed it by using MT for everything. Add this near the top of fTetWild's CMakeLists.txt:

if(MSVC)
    foreach(config ${CMAKE_CONFIGURATION_TYPES})
        string(TOUPPER ${config} config)
        string(REPLACE /MD /MT CMAKE_C_FLAGS_${config} "${CMAKE_C_FLAGS_${config}}")
        string(REPLACE /MD /MT CMAKE_CXX_FLAGS_${config} "${CMAKE_CXX_FLAGS_${config}}")
    endforeach()

    set(IGL_STATIC_RUNTIME ON)
endif()

You probably will want to delete your build and create it from scratch - that got rid of the last couple multiply defined symbols for me.

crystalthoughts commented 3 weeks ago

Any solutions for this?