fTetWild icon indicating copy to clipboard operation
fTetWild copied to clipboard

trouble compiling on windows

Open lvasa opened this issue 4 years ago • 8 comments

Hi, I'm having trouble compiling on windows - I have installed conda and mpir, but I keep getting linker errors such as

FloatTetwild.lib(LocalOperations.obj) : error LNK2001: unresolved external symbol ___gmpq_add [D:\ftet\build\FloatTetwild_bin.vcxproj]

is there something I should try?

Best,

Libor Vasa

lvasa avatar Jan 04 '21 14:01 lvasa

I got the same problem when I installed gmp using conda. My problem was solved by downloading gmp from here https://cs.nyu.edu/~exact/core/gmp/index.html. Be sure to change environment variables GMP_INC and GMP_LIB accordingly.

hph73 avatar Feb 08 '21 14:02 hph73

Hi, the link looks dead, Any place where i can donwload it? Thanks a lot

dedelecoder avatar Jul 22 '21 04:07 dedelecoder

Hi, you can try downloading gmp from its official website (https://gmplib.org/) and following the instruction there.

Yixin-Hu avatar Jul 24 '21 02:07 Yixin-Hu

@lvasa Edit cmake\FindGMPfTetWild.cmake source file. Find the following two lines:

find_library(GMP_LIBRARIES NAMES gmp libgmp PATHS $ENV{GMP_LIB} ${GMP_WINDOWS_PATH})
find_library(GMPXX_LIBRARIES NAMES gmpxx libgmpxx PATHS $ENV{GMP_LIB} ${GMP_WINDOWS_PATH})

Replace them with the following ones:

find_library(GMP_LIBRARIES NAMES gmp mpir.lib PATHS $ENV{GMP_LIB} ${GMP_WINDOWS_PATH})
find_library(GMPXX_LIBRARIES NAMES gmpxx mpirxx.lib PATHS $ENV{GMP_LIB} ${GMP_WINDOWS_PATH})

Re-generate Visual Studio solution after that change, open in Visual Studio, and build the FloatTetwild_bin project.

Don’t forget to copy mpir.dll into your output directory. Otherwise, Windows will show an error message when you try to run the FloatTetwild_bin.exe you have built.

Const-me avatar Oct 31 '22 22:10 Const-me

Has anyone had this error when generating FloatTetwild_bin in Visual Studio? D:\Mesh2Tet-main\fTetWild\build\Debug\FloatTetwild_bin.exe : fatal error LNK1169: one or more multiply defined symbols were found

zhanghaoxuan184 avatar Apr 29 '23 18:04 zhanghaoxuan184

@Const-me

zhanghaoxuan184 avatar May 04 '23 16:05 zhanghaoxuan184

Hi, the link looks dead, Any place where i can donwload it? Thanks a lot

I put the libs I use here. https://github.com/hph73/gmp

hph73 avatar Aug 10 '23 17:08 hph73

hi, is there any complete binary of fTetWild with dll required?

xyont avatar Sep 03 '23 20:09 xyont