Operating System - HP-UX
1833847 Members
2334 Online
110063 Solutions
New Discussion

Error in linking: main (Not referenced yet!)

 
guptaanunay
Occasional Contributor

Error in linking: main (Not referenced yet!)

Hi All!

I am having a problem while linking on HP-UX.
Following is my command line:-
$ cc -s -o ../lib/libcauwvreg.sl ./cauwvreg.o /opt/CA/CAlib/lic98.sl -L/opt/CA/CAlib/ -lwinc -ldld -lpig

This is reporting the following error:-
/usr/ccs/bin/ld: Unsatisfied symbols:
main (Not referenced yet! Probably due to -u option)
gnumake: [../lib/libcauwvreg.sl] Error 1 (ignored)

Interestingly, the library ../lib/libcauwvreg.sl does get formed, but it contains no symbols:-
$ nm ../lib/libcauwvreg.sl
nm: ../lib/libcauwvreg.sl: no symbols

Can anybody suggest something how to proceed?

Thanks,
Anunay
2 REPLIES 2
Muthukumar_5
Honored Contributor

Re: Error in linking: main (Not referenced yet!)

Can you try as,

$ cc -s -o ./cauwvreg.o ../lib/libcauwvreg.sl /opt/CA/CAlib/lic98.sl -L/opt/CA/CAlib/ -lwinc -ldld -lpig

hth.
Easy to suggest when don't know about the problem!
guptaanunay
Occasional Contributor

Re: Error in linking: main (Not referenced yet!)

No, Muthu, that didnt help.
Well, I have found a solution for this problem. I removed the -s flag and included -b flag.

Thanks.