what will cause function exported as local function in .so?

D

DDD

Hi,
I have a C++ library in Linux. And I wanna export the function
declared in .h file. But after compiled, the function is tagged by t,
namely local symbol, and can not be used by another program.

Any suggestions?

Thanks in advance.
 
M

mzdude

I checked .a file, and the same function exported as T in .a.

Sprechen sie von C++ wrote:





- Show quoted text -

You are most likely running into name mangling.

Use extern "C" to prevent that.
 
D

DDD

mzdude said:
You are most likely running into name mangling.

Use extern "C" to prevent that.

Using exterc "C" has no efficient.

I check .o file of that export function.
$>nm the.o
....
000000e0 T Close
....

$>nm libthe.a
....
00000090 T Close

but nm libthe.so
oooooo80 t Close


....
 

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

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top