I'm trying to install the tools for gameplay3d. After following the cmake installation instructions, I get this error:

Linking CXX executable gameplay-encoder
/usr/lib/gcc4/x64/release/libfbxsdk.so: undefined reference to `dlopen'
/usr/lib/gcc4/x64/release/libfbxsdk.so: undefined reference to `dlclose'
/usr/lib/gcc4/x64/release/libfbxsdk.so: undefined reference to `dlsym'

The CMakeLists.txt file comes with these definitions (notice -ldl and ${CMAKE_DL_LIBS}, which seemed to solve the problem for others in related threads):

add_definitions(-lstdc++ -ldl -lfbxsdk -lpng -lz -lfreetype -lpthread)

Thanks for the help!

  • Problem "solved" by using the binary that is distributed with the library. Still a very strange error, though.
    – wrongu
    Mar 24, 2014 at 0:06
  • Got the same problem here... 64bit Ubuntu 13.10 and I built the library which misses dlopen myself. Unfortunately there is nothing distributed that I can use here :/ I'm trying to build Pluma for a custom thirdparty set of CxxProf. It works without problems on a 32bit Debian...
    – MOnsDaR
    May 1, 2014 at 15:03

1 Answer 1


As I wrote in a comment:
I just had the same problem on a Ubuntu 13.10 64bit. I'm not sure if the cause of our issue is the same Ubuntu version, as I solved it as follows:

I used a self-compiled version of the Pluma library. Whenever I tried to compile my own project which used that Pluma lib, I got the error you mentioned above. I tried to add ${CMAKE_DL_LIBS} like you, but had no success.

The reason was, that I had to manually link Pluma with libdl at first (add -ldl). After that I could use libPluma.so without problems. I'm not sure, why Pluma compiled without -ldl, but I can only guess that it's something with the linker not working properly.

So to make it short (and answer your actual question):
You need to link libfbxsdk.so with -ldl, it does not help to just link gameplay-encoder with it.

  • Sadly this doesn't work for me, when building sqlite with CMake 3.1 Jan 25, 2015 at 23:51

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .