pytorch / cppdocs

PyTorch C++ API Documentation
https://pytorch.org/cppdocs
208 stars 33 forks source link

linker error in building a minimal C++ application #8

Open ly1231cn opened 4 years ago

ly1231cn commented 4 years ago

Hi there, I tried to build a minimal C++ based on the latest nightly build of libtorch but got the following errors. Can someone help? /lib/../lib64/crt1.o: In function _start': (.text+0x20): undefined reference tomain' .../libtorch_nightly/lib/libtorch.so: undefined reference to lgammaf@GLIBC_2.23' .../libtorch_nightly/lib/libtorch.so: undefined reference tolgamma@GLIBC_2.23' collect2: error: ld returned 1 exit status gmake[3]: [stylegan] Error 1 gmake[2]: [CMakeFiles/mymodel.dir/all] Error 2 gmake[1]: [CMakeFiles/mymodel.dir/rule] Error 2 gmake: [mymodel] Error 2