anhttran / 3dmm_basic

An implementation of the classical 3DMM fitting algorithm
116 stars 31 forks source link

make issue #6

Open soumabo opened 6 years ago

soumabo commented 6 years ago

Hi,

i got these errors when running make

../modules/CvGl/libCvGl.so : undefined reference to « gluPerspective » ../modules/CvGl/libCvGl.so : undefined reference to « gluProject » collect2: error: ld returned 1 exit status config/CMakeFiles/IRIS_3DMM.dir/build.make:251 : the recipe for the target « bin/IRIS_3DMM » has failed make: *** [bin/IRIS_3DMM] Erreur 1

any one have an idea ? Thank you

bettertang commented 5 years ago

the same problem do you solve it?

lyx323 commented 5 years ago

I got the same problem, and I fixed it finally. The main problem is in the CvGl. Change the CMakeLists.txt in the CvGl fold:

  1. Add #########################################################

    FIND GLUT

    ######################################################### find_package(GLUT REQUIRED) include_directories(${GLUT_INCLUDE_DIRS}) link_directories(${GLUT_LIBRARY_DIRS}) add_definitions(${GLUT_DEFINITIONS}) if(NOT GLUT_FOUND) message(ERROR " GLUT not found!") endif(NOT GLUT_FOUND)

#########################################################

FIND OPENGL

######################################################### find_package(OpenGL REQUIRED) include_directories(${OpenGL_INCLUDE_DIRS}) link_directories(${OpenGL_LIBRARY_DIRS}) message(WARNING "OpenGL_LIBRARY: ${OpenGL_LIBRARY_DIRS}")

2.Delete and Change Delete the sentence "target_link_libraries(CvGl ${OpenGL_LIBRARY_DIRS} ${GLUT_LIBRARY_DIRS} )" as "target_link_libraries(CvGl -lglut -lGLU -lGL)"

you can try it

anhttran commented 5 years ago

Dear all,

In case you have an issue of compiling my code, I have updated the CMakeLists.txt of CvGL and added Docker support. Please check the updated README for more details.

Hope it help.

Best regards, Anh