LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices

Reply
 
Search this Thread
Old 01-29-2004, 01:45 PM   #1
acjt
Member
 
Registered: Dec 2002
Location: Australia
Distribution: Gentoo
Posts: 161

Rep: Reputation: 30
C++ Linking Problem


I am trying to run this:

Code:
/usr/vacpp/bin/makeC++SharedLib_r -p 1026 -o libGenericA.a -lld -L /usr/vacpp/lib -lC_r -lC -L/usr/lib/threads -lpthreads -lc_r -L/home/me/install/lib -lqqdb -L/home/me/install/lib -lqqknpthrd -L/home/me/install/lib -lqqcm -L/home/me/install/lib -lqqdo -L/home/me/install/lib -lqqfo -L/home/me/install/lib -lqqsm  -L/home/me/userlib -lexpressd
I get this error:
Code:
ld: 0706-006 Cannot find or open library file: -l expressd
ld:open(): A file or directory in the path name does not exist.
This is what is in /home/me/userlib
Code:
-rwxr-xr-x   1 me code     738814 Jan 29 19:50 libexpressd.a
Now, I'm not an expert at this, but it seems it should work, considering that the library libexpressd.a exists in the correct directory and has OK permissions?

Perhaps someone knows more than I?
Thanks.
 
Old 01-29-2004, 03:17 PM   #2
jim mcnamara
Member
 
Registered: May 2002
Posts: 964

Rep: Reputation: 34
/home/me is in your PATH?
 
Old 01-29-2004, 03:54 PM   #3
acjt
Member
 
Registered: Dec 2002
Location: Australia
Distribution: Gentoo
Posts: 161

Original Poster
Rep: Reputation: 30
No, but it is in LIBPATH environment variable. Why would it need to be in my PATH? (This is actually a question, not a statement).
 
Old 01-29-2004, 08:22 PM   #4
wapcaplet
Guru
 
Registered: Feb 2003
Location: Colorado Springs, CO
Distribution: Gentoo
Posts: 2,018

Rep: Reputation: 48
Is /home/me also in /etc/ld.so.conf? If not, you might need to add it there and then run 'ldconfig' as root. It might be safer to put that library in /usr/local/lib or something, though, since it might be potentially dangerous to include a user-writable location among your libraries.

I don't see any reason why /home/me needs to be in your actual $PATH, though, unless you plan on regularly running executables from it.

Last edited by wapcaplet; 01-29-2004 at 08:23 PM.
 
Old 01-31-2004, 08:48 AM   #5
acjt
Member
 
Registered: Dec 2002
Location: Australia
Distribution: Gentoo
Posts: 161

Original Poster
Rep: Reputation: 30
Hi,
I don't have such a file as /etc/ld.so.conf - this is an AIX machine - not linux :0 -
The existing build tool puts the file in the directory. It just seems weird that the linker doesn't seem to be able to 'see' the file. I really wanted to ensure the syntax I provided was correct.

Thanks.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking Problem I think? gplacek Linux - Software 10 08-13-2004 07:01 PM
ld linking problem captain-mythos Linux - Software 1 06-20-2004 08:46 AM
Library linking problem The_Nerd Programming 10 04-26-2004 11:07 PM
Problem linking Red Guy Programming 1 02-07-2003 03:52 AM
linking problem with ld ! gluon Programming 2 05-19-2002 01:59 PM


All times are GMT -5. The time now is 12:12 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration