Operating System - HP-UX
1842198 Members
2183 Online
110188 Solutions
New Discussion

/usr/ccs/bin/ld: Can't find library: ".test1.o"

 
Vasudevan MV
Frequent Advisor

/usr/ccs/bin/ld: Can't find library: ".test1.o"

I am able to compile the code, but getting the above error while linking.
The OS is HP 11x and compiler is aCC.

Command:
aCC -o server -L /home/vasu/lib.a -l test1.o serv.o

Please reply ASAP
Thanks
Vasu
5 REPLIES 5
Eugeny Brychkov
Honored Contributor

Re: /usr/ccs/bin/ld: Can't find library: ".test1.o"

Try
aCC -o server -L /home/vasu -l lib.a test1.o serv.o
Try using ld with the same parameters
Eugeny
Rohan_4
New Member

Re: /usr/ccs/bin/ld: Can't find library: ".test1.o"

Can also try,
aCC -o server -L /home/vasu/ -llib test1.o serv.o

-Rohan
Vasudevan MV
Frequent Advisor

Re: /usr/ccs/bin/ld: Can't find library: ".test1.o"

Thanks Eugeny & Rohan:

I am getting a new error now :

/usr/ccs/bin/ld: Unsatisfied symbols:
func1(first referenced in ./source/test1.o) (code)

Vasu
Eugeny Brychkov
Honored Contributor

Re: /usr/ccs/bin/ld: Can't find library: ".test1.o"

Vasu,
does your program calls this 'func1' function in its code? I think you should define and develop its code in your program. I do not believe 'func1' function exists in standard libraries :o)
So check your code for typos and if you developed this 'func1' function's code
Eugeny
Vasudevan MV
Frequent Advisor

Re: /usr/ccs/bin/ld: Can't find library: ".test1.o"

Eugeny,

I found the answer from the below link :

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0xce1fcbaac6dcd5118ff40090279cd0f9,00.html

I was using c & c++ codes, this link helped me to solve the problem.

Vasu