I am trying to compile the examples of libhand, but I get the following output:
/usr/bin/ld: /usr/local/lib/libOgreMainStatic.a(OgreDynLib.cpp.o): undefined reference to symbol 'dlopen@@GLIBC_2.1'
/usr/bin/ld: note: 'dlopen@@GLIBC_2.1' is defined in DSO /usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libdl.so so try adding it to the linker command line
/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu/libdl.so: could not read symbols: Invalid operation
collect2: ld returned 1 exit status
make[2]: *** [bend_one_finger] Error 1
make[1]: *** [CMakeFiles/bend_one_finger.dir/all] Error 2
make: *** [all] Error 2
The same thing happens when I try to compile my own example using the direction from libhand example. I believe it has something to do with the configuration file of libhand (LibHandConfig.cmake).
The same example compiles fine when I build it as a part of libhand, the problem occurs when I try to use libhand as a package (using cmake's FIND_PACKAGE() )
Not a complete answer, but just a step toward:
try to issue the following command after you got the
make
error:If it succeeds than you have to manually add -ldl to the end of your libraries list (
target_link_libraries(example ${SOME_LIBS} ${OTHER_LIBS} -ldl)
). It seems that the configuration part of LibOGRE is slightly incorrect (it doesn't include a library libdl necessary to carelessly link application with it.