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
wibble-test-genrunner(1)				      General Commands Manual					  wibble-test-genrunner(1)

NAME
wibble-test-genrunner - Code generator for wibble testsuites. SYNOPSIS
wibble-test-genrunner header <file> wibble-test-genrunner main <files> DESCRIPTION
The program generates .cpp files that are then compiled and linked into a test program for running tests from .test.h files. Examples of such .test.h files may be found among wibble headers, eg. /usr/include/wibble/regexp.test.h. In the first form, the program processes a single header file (usually of the form foo.test.h) and produces a corresponding .cpp file to be compiled. In the second form, it takes as <files> all the .test.h headers and produces a single main.cpp which contains the main() function of the test program, which then runs all the tests in all the .test.h files. The generated source code is always written to standard output and it is left up to the user to redirect it to a meaningful location. The program currently has no options other than the two forms above. The program is intended to be run as part of build process of programs or libraries using the wibble testing framework. For convenient use from CMake, there is a test.cmake script under /usr/share/wibble, that takes care of producing all the .cpp files (both per-header and the main one), compiling them and linking them into a single binary which executes the testsuite. AUTHOR
Petr Rockai <me@mornfall.net> wibble-test-genrunner(1)