link problem

D

DDD

Hi all,
I have a problem when linking shared library in Ubuntu.
After compipled, the process comes to linking. But it
pronounces :undefined reference ***. It's a common problem that need
extra library. And I am sure I have include -L and -l option in g++
command.

I also using nm to list the functions in the needed library. A list of
functions showed with t type before the function which I referenced in
my g++. t means local symbol. T means external symbol. Is there any
difference between the two type symbols when linking?
 
M

Maxim Yegorushkin

I have a problem when linking shared library in Ubuntu.
After compipled, the process comes to linking. But it
pronounces :undefined reference ***. It's a common problem that need
extra library. And I am sure I have include -L and -l option in g++
command.

I also using nm to list the functions in the needed library. A list of
functions showed with t type before the function which I referenced in
my g++. t means local symbol. T means external symbol. Is there any
difference between the two type symbols when linking?

There is. Local symbols don't get exported from the shared library,
i.e. they are not accessible to the users of the shared library.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,160
Messages
2,570,890
Members
47,423
Latest member
henerygril

Latest Threads

Top