Operating System - Linux
1753808 Members
8257 Online
108805 Solutions
New Discussion

Re: Problem about Library

 
Fei Rao
Advisor

Problem about Library

Hi,

I wrote a program. Two files: utilities.C and aeact.C. Then I use the following commands to get the executable file:
aCC -AA +DAportable -I/opt/ftam/include -g -c utilities.C
aCC -AA +DAportable -I/opt/ftam/include -g -c aeact.C
aCC -AA -o aeact aeact.o utilities.o -lmap -lmapftam -mt

When I run the program aeact, the output is unexpected like the following:
/usr/lib/dld.sl: Unresolved symbol: log_instance (data) from /opt/ftam/shlib/libmapftam.4
/usr/lib/dld.sl: Unresolved module for symbol: ft_aeactivation (code) from aeact
Abort(coredump)

I use gdb to debug the executable, it coredump at the first call of the library mapftam.

Then I wrote another program in c, and use:
aCC -Ae +DAportable -g -o myaeact myaeact.c -lmapftam -lmap to build the executable, it works well.

What can I do to fix the problem of aeact program? Thanks in advance.

Regards,
Fei
Life is easy. Life is hard.
1 REPLY 1
Sandman!
Honored Contributor

Re: Problem about Library

Rao,

To resolve dependencies that are not present in the default "/usr/lib" directory searched by the link-editor (ld) specify the full path to the mapftam shared library with the -L option as:

# aCC -AA -o aeact aeact.o utilities.o -L/opt/ftam/shlib -lmap -lmapftam

regards!