Help while linking the library in AIX


 
Thread Tools Search this Thread
Operating Systems AIX Help while linking the library in AIX
# 1  
Old 06-21-2009
Help while linking the library in AIX

Hi,
I have one library(libfoo.a) that is folder /home/xyz and my c program is in /home/xyz/cprog. Whenever I issue cc command
cc -o test test.c -lfoo , i get the error /usr/bin/ld: cannot find -lfoo.
echo $PATH has already listing of /home/xyz variable, even LIBPATH also has same entry /home/xyz.
Can some one tell me why compiler not able to locate the library.

whenever i issue the command

cc -o test test.c -L lfoo, it works and gives me the executable.

Please tell me , how does compiler able to locate the library file with -L option , I have not given any path of library.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Programming

C++ linking library to a library

Hi All, My application main engine will use a shared library where we do many operation. We are trying to implement the linear algebra operation on the shared library for that I need to link my shared library to the lapack library in /usr/lib. Below is my make file. Can you please let me... (2 Replies)
Discussion started by: arunkumar_mca
2 Replies

2. OS X (Apple)

Linking to a shared library

I'm trying to get Valgrind to work with an openmpi application in OS X. However I want to hardcode the path to a shared library called libmpiwrap-amd64-darwin.so into my application so that it is available at runtime. In Linux this is relatively simple, I would just add the option... (0 Replies)
Discussion started by: Valgrinder
0 Replies

3. Programming

Library linking with GMP

I am trying to set up the gnu multiple precision arithmetic library for some c++ programming I have to do. I am using a system with mac osx 10.6.3 and do NOT have root user access. I'm trying to use gmp 5.0.1. Since I don't have root user access, I had to install to a different directory Thus... (3 Replies)
Discussion started by: bluejayek
3 Replies

4. UNIX for Advanced & Expert Users

Linking issue under AIX

Hello everyone: I've made a program for AIX, but it's unable to run, by running ld I got the following screen: ld MyApp ld: 0711-317 ERROR: Undefined symbol: getenv ld: 0711-317 ERROR: Undefined symbol: _iob ld: 0711-317 ERROR: Undefined symbol: fprintf ld: 0711-317 ERROR: Undefined... (1 Reply)
Discussion started by: edgarvm
1 Replies

5. AIX

linking warning in AIX-Please help-duplicate symbols :(((

:confused: Hi All I am getting following warnings on AIX: ctsaix01-kepatil > make -f MakePMXMLParserAIX.mak xlC_r -g -c -DAIX -D_REENTRANT -I. -I/ctsadev/Development/kepatil/p4client/3rd_party/XercesC/2.7.0/UNIX/AIX-51/XercesC/include -I../../API/INC -c -w -DNDEBUG -DAPP_NO_THREADS... (0 Replies)
Discussion started by: login0001
0 Replies

6. UNIX for Dummies Questions & Answers

Link error while linking a shared library in unix

Getting the following error , ld: /opt/syncsort39/lib/libsyncsort.sl: Mismatched ABI. 64-bit PA shared library found in 32-bit link. Is there any difference in the ld options in opt file while linking a 64 bit shared library ? Or is the problem because we are trying to link both 32 bit and 64... (3 Replies)
Discussion started by: arunkumar_mca
3 Replies

7. UNIX for Advanced & Expert Users

AIX Library Interposer

Hello, We are working on a product which requires library interposing. And according to the market requirements, needs to be migrated on AIX OS also. So now, the question is "Is library interposing possible in AIX?" If yes, how? If no, then what are the other alternatives? As per my... (2 Replies)
Discussion started by: mrunal
2 Replies

8. Shell Programming and Scripting

AIX Library Interposer

Hello, I have query on Library Interposer: We are working on a product which requires library interposing. And according to the market requirements, needs to be migrated on AIX OS also. So now, the question is "Is library interposing possible in AIX?" If yes, how? If no, then what are the... (1 Reply)
Discussion started by: mrunalrane
1 Replies

9. AIX

Linking query in AIX

Hi, Can we link to 2 libraries out of which one is compiled with version 5 and other with version 6. version 6 used AIX 5.0 Version 5 used AIX 4.3 Will there be any runtime problems because of this ( If it goes through linking step )? Thanks , Suman (2 Replies)
Discussion started by: suman_jakkula
2 Replies

10. Programming

Linking problem while linking to shared library

Hi I'm getting ld: fatal: option -h and building a dynamic executable are incompatible ld: fatal: Flags processing errors When I run ld -shared -L/usr/dt/lib -lDtSvc -o builtin.so Workspace.o after running gcc -fPIC -I/usr/X11R6/include -I/usr/dt/include -c Workspace.c I'm... (6 Replies)
Discussion started by: laho
6 Replies
Login or Register to Ask a Question
DH_SHLIBDEPS(1) 						     Debhelper							   DH_SHLIBDEPS(1)

NAME
dh_shlibdeps - calculate shared library dependencies SYNOPSIS
dh_shlibdeps [debhelperoptions] [-Lpackage] [-ldirectory] [-Xitem] [--params] DESCRIPTION
dh_shlibdeps is a debhelper program that is responsible for calculating shared library dependencies for packages. This program is merely a wrapper around dpkg-shlibdeps(1) that calls it once for each package listed in the control file, passing it a list of ELF executables and shared libraries it has found. OPTIONS
-Xitem, --exclude=item Exclude files that contain item anywhere in their filename from being passed to dpkg-shlibdeps. This will make their dependencies be ignored. This may be useful in some situations, but use it with caution. This option may be used more than once to exclude more than one thing. -- params Pass params to dpkg-shlibdeps(1). -uparams, --dpkg-shlibdeps-params=params This is another way to pass params to dpkg-shlibdeps(1). It is deprecated; use -- instead. -ldirectory[:directory ...] With recent versions of dpkg-shlibdeps, this option is generally not needed. It tells dpkg-shlibdeps (via its -l parameter), to look for private package libraries in the specified directory (or directories -- separate with colons). With recent versions of dpkg-shlibdeps, this is mostly only useful for packages that build multiple flavors of the same library, or other situations where the library is installed into a directory not on the regular library search path. -Lpackage, --libpackage=package With recent versions of dpkg-shlibdeps, this option is generally not needed, unless your package builds multiple flavors of the same library or is relying on debian/shlibs.local for an internal library. It tells dpkg-shlibdeps (via its -S parameter) to look first in the package build directory for the specified package, when searching for libraries, symbol files, and shlibs files. If needed, this can be passed multiple times with different package names. EXAMPLES
Suppose that your source package produces libfoo1, libfoo-dev, and libfoo-bin binary packages. libfoo-bin links against libfoo1, and should depend on it. In your rules file, first run dh_makeshlibs, then dh_shlibdeps: dh_makeshlibs dh_shlibdeps This will have the effect of generating automatically a shlibs file for libfoo1, and using that file and the libfoo1 library in the debian/libfoo1/usr/lib directory to calculate shared library dependency information. If a libbar1 package is also produced, that is an alternate build of libfoo, and is installed into /usr/lib/bar/, you can make libfoo-bin depend on libbar1 as follows: dh_shlibdeps -Llibbar1 -l/usr/lib/bar SEE ALSO
debhelper(7), dpkg-shlibdeps(1) This program is a part of debhelper. AUTHOR
Joey Hess <joeyh@debian.org> 11.1.6ubuntu2 2018-05-10 DH_SHLIBDEPS(1)