0

I'm trying to compile a program in GCC, however when I do so it is providing me with this error:

/usr/bin/ld: sqlite3.o: undefined reference to symbol 'dlclose@@GLIBC_2.2.5'
//lib/x86_64-linux-gnu/libdl.so.2: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

I've been trying to research the issue so that I can fix it on my own, but no solutions seem to be working for me. I'm still learning how things like this work, so I apologize in advance if this is a stupid question.

Casuallynoted
  • 19
  • 1
  • 4
  • 1
    What command-line are you passing to gcc in the linking stage? – Mats Petersson May 12 '16 at 04:33
  • 2
    `-ldl` ............ – xaxxon May 12 '16 at 04:38
  • @Mats, I'm not quite sure what you mean, I'm still learning some of this. – Casuallynoted May 12 '16 at 12:01
  • @xaxxon what do you mean by this? Should I put that somewhere? – Casuallynoted May 12 '16 at 12:02
  • The undefined reference to `dlclose` tells us your program needs to be linked with `libdl`, by passing option `-ldl` to the linker, and you are not doing this. But as you haven't shown us the command(s) you are using to compile and link the program we can't tell you where you need to place this option. Post those command(s) in the body of your question. – Mike Kinghan May 12 '16 at 15:35

0 Answers0