ld: Unsatisfied symbol (135 Views)
Reply
Advisor
JaganKumar
Posts: 17
Registered: ‎05-16-2007
Message 1 of 4 (135 Views)

ld: Unsatisfied symbol

while trying to make our application exe's i am getting unsatisfied symbol.

here is the linker, compiler flag and the make command.
CFLAGS=+DD32 -Aa +z -I../include -I$(ODL)/include -I$(SYBASE)/ASE-15_0/include -I/pkg1/sybase_base/OCS-15_0/include $(DEBUG) -lc
LPATH= LPATH=../bin:$(ODL)/bin:$(SYBASE)/OCS-15_0/lib:/lib:/usr/lib/hpux32

../bin/libnewfab.sl : $(OBJS)
$(LPATH) ld -b -E +s $(OBJS) \
-lsybdb -lodlsyb -lcurses -lmont -o $@

../bin/fabrpt : fabrpt.c
$(LPATH) cc $(CFLAGS) fabrpt.c \
-lnewfab -lods -lpctl -lpkts -lcom -ltools -lodlsyb -lsybdb -lmont \
-ldld -Wl,+s -o $@

and i am getting 62 error stating unsatisfied symbols
ld: Unsatisfied symbol "mtraceSqlLogger" in file fabrpt.o
ld: Unsatisfied symbol "WorkList" in file fabrpt.o
ld: Unsatisfied symbol "TempDb" in file fabrpt.o
ld: Unsatisfied symbol "stRender" in file fabrpt.o
ld: Unsatisfied symbol "ItemFileSize" in file fabrpt.o
ld: Unsatisfied symbol "sno" in file fabrpt.o
ld: Unsatisfied symbol "dbbind" in file fabrpt.o
ld: Unsatisfied symbol "GetSubrName" in file fabrpt.o
ld: Unsatisfied symbol "xmlOrdrNbr" in file fabrpt.o
ld: Unsatisfied symbol "mtraceInitMain" in file fabrpt.o
ld: Unsatisfied symbol "retCode" in file fabrpt.o
ld: Unsatisfied symbol "strcmpi" in file fabrpt.o

i hope we are properly linking the lib which we make as part of this make.

Please help me in this regard.
Acclaimed Contributor
Dennis Handly
Posts: 25,072
Registered: ‎03-06-2006
Message 2 of 4 (135 Views)

Re: ld: Unsatisfied symbol

Where do you think these symbols are defined?

If your libs are archives, you may have to use -Wl,+n or reorder them. This occurs if -lmont needs a symbol from -lnewfab.
Advisor
JaganKumar
Posts: 17
Registered: ‎05-16-2007
Message 3 of 4 (135 Views)

Re: ld: Unsatisfied symbol

These symbols are availble in libnewfab.sl which is part of our Make file.

lmont and lnewfab are present in same dir. Still we are getting this problem.

thanks for your comments.
Acclaimed Contributor
Dennis Handly
Posts: 25,072
Registered: ‎03-06-2006
Message 4 of 4 (135 Views)

Re: ld: Unsatisfied symbol

>These symbols are availble in libnewfab.sl

If this is a shlib, there is no ordering problem.

So you need to prove those symbols are in your shlib and you didn't hide them.
$ elfdump -n .dynsym -s libnewfab.sl | fgrep -e mtraceSqlLogger -e WorkList

>$(LPATH) ld -b -E +s $(OBJS) \

Note: you should NOT be using LPATH. This is reserved for the compiler driver and emergencies. You should simply pass in multiple -L options.

Use: LIBS=-L../bin -L$(ODL)/bin -L$(SYBASE)/OCS-15_0/lib

And add this macro before your -l libs.
The opinions expressed above are the personal opinions of the authors, not of HP. By using this site, you accept the Terms of Use and Rules of Participation.