Reputation: 876
When I try to compile a little lua program, I get these errors :
/usr/lib//liblua52.so: undefined reference to `dlsym'
/usr/lib//liblua52.so: undefined reference to `dlerror'
/usr/lib//liblua52.so: undefined reference to `dlopen'
/usr/lib//liblua52.so: undefined reference to `dlclose'
Of course, I link with -ldl. I have lua5.2-dev installed on my ubuntu. If you need any more infos ask me.
Thanks!
Upvotes: 1
Views: 1773
Reputation: 1
Ensure -ldl is exactly at the end of your link line as Employed Russian mentioned
Upvotes: 0
Reputation: 887
The easy way to get this error is to have your PLAT variable set wrong in the Makefile. You need to set it in the top level Makefile and the src/Makefile.
The legal values show up about 10 lines down from the definition.
Upvotes: 0
Reputation: 213955
When I try to compile a little lua program, I get these errors
No. You get these errors when you link the program.
The fix is to add -ldl
at the end of your link line.
Upvotes: 5