User forums > Using Code::Blocks

undefined reference to fuctions in my library

<< < (2/2)

lirong:
Hi,
How can I show the command line of the compile/link?

Thanks

lirong:
The project of the library is call libodlm. It's output is ../bin/Debug/odlm.so
The test project is called odlm-test.  It's output is ../bin/Debug/odlm-test

Here is the full command line linking odlm-test:
g++ -L../bin/Debug -L/usr/lib -o ../bin/Debug/odlm-test ../obj/Debug/main.o -lodlm

And odlm.so is indeed in the folder ../bin/Debug

So... What's the problem?

jsibarani:

--- Quote from: lirong on August 16, 2007, 10:25:23 am ---The project of the library is call libodlm. It's output is ../bin/Debug/odlm.so
The test project is called odlm-test.  It's output is ../bin/Debug/odlm-test

--- End quote ---

Hi,
Did you also create the import library?
if you did, then you can try to link with it(something like libodlm.a)

Good luck

dje:
*.so on Linux = *.dll on windows
import libraries are Windows specific and are one way to export symbols that can be used outside the dll.
Don't try to use import libraries on Linux.

Dje

Navigation

[0] Message Index

[*] Previous page

Go to full version