Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* Unresolved symbols during link
@ 1999-04-30  4:00 whinston
  1999-05-03  4:00 ` Joe Mario
  0 siblings, 1 reply; 2+ messages in thread
From: whinston @ 1999-04-30  4:00 UTC (permalink / raw)


Hello all:

I have problems linking my C program on a OSF1 v4.0 machine. I have done
some research and found answers to most of my problems. However, there is
still one symbol left unresolved.

The program is a multi-threaded app that uses pthreads. This is the compile
command:

cc -I. -I.. -D_REENTRANT cltest.c


This object file is linked with a number of libraries, most of which are
shared objects. Note that most of these libraries are not system libraries
(local libs and database libs):

cc -v -shared -L/users/saw/lib -L/users/saw/gnu -rpath
/users/saw/lib:/usr/shlib  -g  -L/users/saw/lib -L/users/saw/gnu -loaxmmsg
-loaxmshm -loaxmora -loaxmotn -loaxmstb -loal -loa -lda -ldaffl -ldainf
-ldaora -ldastb -lea -leastb  -lia -ln a -lnastb -lox -ldl
/dbs1/inf720/lib/esql/libixos.a  /dbs1/inf720/lib/esql/libix gen.a 
/dbs1/inf720/lib/esql/libixsql.a  /dbs1/inf720/lib/libixasf.a  /dbs1/inf7
20/lib/esql/libixos.a  /dbs1/inf720/lib/esql/libixgen.a 
/dbs1/inf720/lib/esql/l ibixgls.a  -ltli  /dbs1/inf720/lib/netstub.a  -lxti
-laio -lm -lrt -lots -lsecur ity -laud	/dbs1/ora804/lib/libclntsh.so
-lreadline -ltermcap -loal -loa -lda -l daffl -ldainf -ldaora -ldastb -lea
-leastb  -lia -lna -lnastb -lox -ldl /usr/ccs /lib/crt0.o -loacl -pthread
cltest.o  -o cltest


And the unresolved symbol error when I try to execute it:

1473:cltest: /sbin/loader: Error: Unresolved symbol in /usr/shlib/libc.so:
_end 1473:cltest: /sbin/loader: Fatal Error: this executable has unresolvable
symbols


I have seen a number of other postings that deal with this problem but
those solutions haven't worked for me. If you can help, I would greatly
appreciate your assistance.

Thanks,
Stephen

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Unresolved symbols during link
  1999-04-30  4:00 Unresolved symbols during link whinston
@ 1999-05-03  4:00 ` Joe Mario
  0 siblings, 0 replies; 2+ messages in thread
From: Joe Mario @ 1999-05-03  4:00 UTC (permalink / raw)
  To: whinston

Stephen:
	The reason you're getting the "_end" unresolved symbol
	is because your link line is creating a shared library
	and not an executable.  Please change the "-shared"
	flag to "-call_shared" so that you'll be building an
	executable.  The "man 3 end" manpage has more about
	the symbols like end.

	Also, please remove the "/usr/ccs/lib/crt0.o" from your
	link line.  The cc driver inserts it in the link line
	where it's needed.

	You also need to put your cltest.o object file earlier
	in the link line.  If it references symbols that are defined
	in other libraries, they will never get linked in unless
	cltest.o is seen by the linker before those libraries.

	One last nit, as of the DIGITAL UNIX V4.0 release, for
	C applications, you no longer need to link with libots.
	All _Ots* symbols used by DEC C are defined in libc.

Joe Mario
Compaq Tru64 Development Environment

	

whinston@my-dejanews.com wrote:
> 
> I have problems linking my C program on a OSF1 v4.0 machine.  
> ...
> cc -v -shared -L/users/saw/lib -L/users/saw/gnu -rpath
> /users/saw/lib:/usr/shlib  -g  -L/users/saw/lib -L/users/saw/gnu
> -loaxmmsg -loaxmshm -loaxmora -loaxmotn -loaxmstb -loal -loa -lda
> -ldaffl -ldainf -ldaora -ldastb -lea -leastb  -lia -ln a -lnastb 
> -lox -ldl /dbs1/inf720/lib/esql/libixos.a  
> /dbs1/inf720/lib/esql/libix gen.a /dbs1/inf720/lib/esql/libixsql.a
> /dbs1/inf720/lib/libixasf.a  /dbs1/inf720/lib/esql/libixos.a
> /dbs1/inf720/lib/esql/libixgen.a /dbs1/inf720/lib/esql/libixgls.a
> -ltli  /dbs1/inf720/lib/netstub.a  -lxti -laio -lm -lrt -lots 
> -lsecurity -laud  /dbs1/ora804/lib/libclntsh.so -lreadline 
> -ltermcap -loal -loa -lda -l daffl -ldainf -ldaora -ldastb -lea
> -leastb  -lia -lna -lnastb -lox -ldl /usr/ccs/lib/crt0.o -loacl
> -pthread cltest.o  -o cltest
> 
> And the unresolved symbol error when I try to execute it:
> 
> 1473:cltest: /sbin/loader: Error: Unresolved symbol in
> /usr/shlib/libc.so:
> _end 1473:cltest: /sbin/loader: Fatal Error: this executable has
> unresolvable symbols



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-05-03  4:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-04-30  4:00 Unresolved symbols during link whinston
1999-05-03  4:00 ` Joe Mario

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox