omni360 / carve

Automatically exported from code.google.com/p/carve
Other
0 stars 0 forks source link

Build error due to undefined symbols on linux using freeglut when using CARVE_WITH_GUI=ON #65

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. run cmake 
2. make
3. get the following build error:

Linking CXX executable view
/usr/bin/ld: 
/usr/lib/gcc/x86_64-linux-gnu/4.8/../../../x86_64-linux-gnu/libglut.a(libglut_la
-freeglut_gamemode.o): undefined reference to symbol 'XGrabKeyboard'
//usr/lib/x86_64-linux-gnu/libX11.so.6: error adding symbols: DSO missing from 
command line
collect2: error: ld returned 1 exit status
make[2]: *** [src/view] Error 1
make[1]: *** [src/CMakeFiles/view.dir/all] Error 2
make: *** [all] Error 2

What is the expected output? What do you see instead?
-----------------------------------------------------

completed build

What version of the product are you using? On what operating system?
-------------------------------------------------------------------

cloned dev sources (hg id: 9a85d733a43d+ tip) on linux 64 Bit (Mint Linux 17) 
using the system packages freeglut3 and freeglut3-dev from the package 
repository.

Please provide any additional information below.
-----------------------------------------------

error goes away with -DCARVE_WITH_GUI=OFF

some googling reveals this may be solved by adding linker flags to X!! ( -lX11 
) somewhere in the CMakeLists

Original issue reported on code.google.com by crobarcr...@gmail.com on 12 Jul 2014 at 12:29