[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A
From: |
Thomas Dickey |
Subject: |
Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A |
Date: |
Tue, 17 Apr 2007 20:24:27 -0400 (EDT) |
On Tue, 17 Apr 2007, Martin MOKREJŠ wrote:
make[1]: Entering directory `/usr/home3/mmokrejs/ncurses-5.6/progs'
gcc ../objects/tic.o ../objects/dump_entry.o -L../lib -lncurses -L../lib
-lncurses -I../progs -I. -DHAVE_CONFIG_H -I. -I../include -D_OSF_SOURCE
-DNDEBUG -I/usr/home3/mmokrejs/include/ncurses -O2 -o tic
_nc_first_name
...
_nc_infotocap
collect2: ld returned 1 exit status
As I noted, you may be able to add an option to gcc to show the specific
files it opens. But in the instance where you used -v, I only saw the
specs file listed.
Making simpler the above compile/linker command while retaining -lncurses
makes the linking step fail again:
$ gcc ../objects/tic.o ../objects/dump_entry.o -I../progs -I. -DHAVE_CONFIG_H
-I. -I../include -D_OSF_SOURCE -DNDEBUG
-I/usr/home3/mmokrejs/include/ncurses -O2 -o tic -lncurses
_nc_first_name
...
On this instance I don't see a -L option.
So gcc will pick up libncurses from its preferred location, e.g.,
/usr/local/lib
Let's link statically the new libncurses.a ...
$ gcc ../objects/tic.o ../objects/dump_entry.o ../lib/libncurses.a -I../progs
-I. -DHAVE_CONFIG_H -I. -I../include -D_OSF_SOURCE -DNDEBUG
-I/usr/home3/mmokrejs/include/ncurses -O2 -o tic
I'd like to solve it this way - but recall some linkers simply put the
entire contents of the ".a" file in the output.
$ ./tic
tic: File name needed. Usage:
tic [-e names] [-o dir] [-R name] [-v[n]] [-V] [-w[n]]
[-1aCcfGgILNrsTtUx] source-file
$
$ ls -la /usr/local/lib/libncurses*
-rwxr-xr-x 1 root system 85030 Jun 1 2001
/usr/local/lib/libncurses++.a
-rw-r--r-- 1 root system 341328 Jun 1 2001
/usr/local/lib/libncurses.a
-rw-r--r-- 1 root system 178976 Jun 1 2001
/usr/local/lib/libncurses.so
-rw-r--r-- 1 root system 2318006 Jun 1 2001
/usr/local/lib/libncurses_g.a
$
So, my problem is that static libs are being built on my system, but linker
is instructed to
use shared libs. Incidentally, gcc picks up the old libncurses installed in
/usr/local.
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
- unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Martin MOKREJŠ, 2007/04/16
- Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Thomas Dickey, 2007/04/16
- Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Thomas Dickey, 2007/04/18
- Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Martin MOKREJŠ, 2007/04/25
- Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Thomas Dickey, 2007/04/25
- Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Tim Mooney, 2007/04/25
- Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Thomas Dickey, 2007/04/26
- Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Tim Mooney, 2007/04/26
- Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Thomas Dickey, 2007/04/26
- Re: unresolved symbols with ncurses-5.6 on Alpha OSF1 5.1A, Martin MOKREJŠ, 2007/04/17