Q: AIX dynamic linked libs


 
Thread Tools Search this Thread
Operating Systems AIX Q: AIX dynamic linked libs
# 1  
Old 04-15-2009
Q: AIX dynamic linked libs

I think the default extension on AIX is .a

so for dynamic lib "libabc.a", we can simply link against it by specifying "-labc"

but here I have a dylib which been built by some one else called "libxyz.so" on AIX. once I say "-lxyz" the linker is only looking for libxzy.a but not .so after that. What is the correct linker option to make it work?

simply rename libxzy.so to libxyz.a works, but I think this solution is NOT good at all.

Thanks in advance

Last edited by acerlinux; 04-15-2009 at 08:29 PM..
# 2  
Old 04-15-2009
Try using -L"path for .so file" -labc
eg:
Your libabc.so file is in /usr/lib/ folder then to link you would write
-L(/usr/lib) -labc
or put the path into a variable before using.

Regards,
Sebby
# 3  
Old 04-15-2009
Quote:
Originally Posted by SBatra
Try using -L"path for .so file" -labc
eg:
Your libabc.so file is in /usr/lib/ folder then to link you would write
-L(/usr/lib) -labc
or put the path into a variable before using.

Regards,
Sebby
Thanks Sebby, all these libraries are located in the project source tree which means I do have -L(/project/path/lib) then -llibname.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. AIX

Create shared libs on AIX (with certain libs which are statically linked)

I want to create a shared lib with certain libs statically linked to it. I can generate a fully shared lib as follows: gcc -maix64 -DHAVE_CONFIG_H -I. -I./src -DHAVE_OPENSSL -I/usr/include/openssl -I/usr/include -I/usr/include/apr-1 -D_LARGEFILE64_SOURCE -I/usr/java8_64/include -shared -o... (0 Replies)
Discussion started by: amandeepgautam
0 Replies

2. SuSE

How to get RPM Dependencies/libs

Hi All, I wanted to install an rpm package on two suse 10 systems. It installed successfully on one system but on the other it throws an error like error: Failed dependencies: rpmlib(PayloadIsLzma) <= 4.4.2-1 is needed by linuxProj-1-1.noarch Now this means that rpnm... (4 Replies)
Discussion started by: dirshah
4 Replies

3. Programming

shared libs

The gcc version is different on my computer than on the remote computer. An ldd on my program says: Is there any way I can tell gcc to compile my program against my version of libc-2.7.so and ld-2.7.so (which I would provide along with the program) instead of the remote computer's libs ? (I do... (5 Replies)
Discussion started by: cyler
5 Replies

4. UNIX for Advanced & Expert Users

Sql dynamic table / dynamic inserts

I have a file that reads File (X.txt) Contents of record 1: rdrDESTINATION_ADDRESS (String) "91 971502573813" rdrDESTINATION_IMSI (String) "000000000000000" rdrORIGINATING_ADDRESS (String) "d0 movies" rdrORIGINATING_IMSI (String) "000000000000000" rdrTRAFFIC_EVENT_TIME... (0 Replies)
Discussion started by: magedfawzy
0 Replies

5. AIX

Dynamic $PS1 content on AIX 4.2 ?

I am trying to set a dynamic PS1 that will change its content no matter what the user does. But I am finding that the shell variables I put in it do not get refreshed. One simple example of what I mean : PS1="$HOSTNAME:$USER $PWD > " if the user changes directory, the PWD variable is not... (2 Replies)
Discussion started by: Browser_ice
2 Replies

6. AIX

runtime libs accessed by application in AIX

Hi , I need some inputs on runtime or shared libs for an application(s) in AIX . i have a requirement saying i need to rehost all the production applications into new AIX OS . Here Source and target oS is AIX but with different versions so for this i need to identify what are the... (1 Reply)
Discussion started by: naren_chella
1 Replies

7. Programming

Seeking Some libs for AIX 5.3

hello everybody! I m compiling some program with the g++ on AIX 5.3 and it needs some library that i didn't find them i am new with the AIX here is the compilation error : g++ -Daix -fpic -o printps -lxercesc1_1 -L/oracle/OraHome/lib32/ -L/epost2/blitz/lib -lhmltods -lhmltops -lgeneric... (0 Replies)
Discussion started by: eternalflame
0 Replies

8. Programming

default location of libs in dlopen

Hi Where is the default location of libs to search, when we specify any lib in dlopen function. And if we want to specify a custom location, how will we do it? thanks. (1 Reply)
Discussion started by: sumsin
1 Replies

9. Programming

HOw to load dynamic lib from a statically linked program ?

I need to load a dynamic library from a statically linked program. Is there a way without recompiling my program. when i try to do that my program just crashes. If not possible, how can I avoid crashing the program when i try to load the dynamic lib, again without recompiling. If my... (1 Reply)
Discussion started by: disclaimer
1 Replies

10. UNIX for Advanced & Expert Users

AIX / bull Dynamic System Partitions

Hi does any body knows some usefull oneline ressources about systemp partitioning ? A FaQ would be perfect... thanks (0 Replies)
Discussion started by: pinguis
0 Replies
Login or Register to Ask a Question