|
cannot find -ldl
|
|
2012-07-03, 01:25 AM
Post: #1
|
|||
|
|||
|
cannot find -ldl
Hi,
following error on SUA6.1: /opt/gcc64/lib/gcc/x86_64-pc-interix6/4.6.0/../../../../x86_64-pc-interix6/bin/ld: cannot find -ldl collect2: ld returned 1 exit status gmake: *** [tcsh] Error 1 not done any hint? Thanks |
|||
|
2012-07-03, 04:41 AM
Post: #2
|
|||
|
|||
|
RE: cannot find -ldl
You have the BETA version of 64-bit gcc installed which is static only.
That is, it does not use shared or dynamic libraries. '-ldl' is for libdl or the lib with the API's for dynamic API loading. An ALPHA version of 64-bit to use shared & dynamic has a problem that I'm waiting for a fix before releasing. If you have source code that needs to do dynamic loading then you'll have to switch to the 32-bit gcc version. If your Makefile (from a configure) was just adding 'ldl' for the heck of it (and this often happens) and it doesn't actually make API calls to dlopen(), dlclose(), dlsym() or dlerror() then just remove this from the link line. |
|||
|
2012-07-03, 02:42 PM
Post: #3
|
|||
|
|||
|
RE: cannot find -ldl
If the compiler didn't complain about not finding dlfcn.h (the header that has the prototypes for dlopen() and such), then you'll probably be fine just not passing -ldl to the linker. If it did complain, and you pointed it at dlfcn.h from somewhere else (it's in the compiler-specific headers, not the general /usr/include or similar), then that probably wouldn't work.
|
|||
|
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)


Search
Member List
Calendar
Help



