#69 "undefined reference: dlopen" on Ubuntu 13.10

1.12.0
open
nobody
None
5
2014-01-12
2014-01-12
Jaap Versteegh
No

Since libcppunit.so is not linked to libdl by default this causes the dlopen dlsym and dlclose symbols to be undefined. This is normally no problem when Specifying -ldl when linking an application that uses libcppunit.so, however Ubuntu uses --as-needed as a default linker flag, which causes the linking to libdl to be dropped when the application itself doesn't use the dl* functions, causing the symbols to remain undefined, leading to build failures of e.g. the DllPlugInTester.
Attached patch checks for availability of --no-as-needed to flag to override the ubuntu default and adds it to LDFLAGS when it is available.

1 Attachments

Discussion