First I would like to thank you for helping.

Markus Kossmann wrote:

> Pierre Morel wrote:
> >
> [...]
> >
> > qfDES_memory.o  -L/usr/lib -ltk8.0 -L/usr/lib -ltcl8.0
> > -L/usr/X11R6/lib -lXext
> > -lX11  -lnsl -ldl tmndec/libh263.a tmn-x/libh263coder.a -lm -static
> > /usr/bin/ld: cannot open -ltk8.0: No such file or directory
> > collect2: ld returned 1 exit status
> > make: *** [vic] Error 1
> >
> > But Tcl/Tk seems well installed on my system:
> >
> > [root@gurli lib]# cd /usr/lib
> > [root@gurli lib]# ls -ld tk*
> > lrwxrwxrwx   1 root     root            6 Jun 22 18:25 tk -> tk8.0/
> > drwxr-xr-x   4 root     root         1024 Apr  9 16:53 tk8.0
> > -rw-r--r--   1 root     root         2588 Oct 11  1998 tkConfig.sh
> > drwxr-xr-x   3 root     root         1024 Apr  9 16:52 tkX8.0.3
> > drwxr-xr-x   2 root     root         1024 Apr  9 16:54 tksysv
> > -rw-r--r--   1 root     root         1069 Oct 11  1998 tkxConfig.sh
> Well , the -ltk8.0 makes the linker search dor libtk8.0.so or libtk8.0.a
> in /usr/lib ( and only there) .
>  Making a link to the library in the tk8.0 directory should solve that
> problem .
> Or add a -L/usr/lib/tk8.0 before the -ltk8.0, so that the linker searchs
> also in that directory.
>

[EMAIL PROTECTED] wrote:

>
> -ltk8.o tells ld to look in its lib path for a file
> named libtk8.0.so or
> so.  You're not showing me one in /usr/lib.  I bet it is
> installed in
> /usr/local/lib.  IIRC, I built an earlier version of
> tcl/tk and by
> default that is where it installed itself.  Try changing
> the -L/usr/lib
> in the Makefile to /usr/local/lib, or maybe there is a
> ./configure
> option to set.  First, of course, check in
> /usr/local/lib to see if
> libtk8.0.so or .a is there. :-)

I have a libtk8.0.so in /usr/lib

[root@gurli lib]# ls -l libtk*
lrxrwxrwx   1 root     root           11 Jun 23 17:11 libtk.so ->
libtk8.0.so
-r-xr-xr-x   1 root     root       599117 May  8  1998 libtk8.0.so
lrwxrwxrwx   1 root     root           14 Apr  9 16:52 libtkx.so ->
libtkx8.0.3.so
-rw-r--r--   1 root     root         4220 Oct 11  1998 libtkx8.0.3.a
-rwxr-xr-x   1 root     root         7404 Oct 11  1998 libtkx8.0.3.so

but obviously I don't have a libtk8.0.a
can it be the source of the problem ?

Here is a part of the Makefile that seems relevant. But i'm not sure as I
know nothing about compiling.

ALL = vic histtolut
all:    $(ALL)

.cc.o:
        rm -f $@; $(C++) -o $@ -c $(CFLAGS) $*.cc

.c.o:
        rm -f $@; $(CC) -o $@ -c $(CFLAGS) $*.c

ED_YBITS = 4

CC = gcc
C++ = c++
CCOPT = -O2

INCLUDE_TK =
INCLUDE_TCL =
INCLUDE_X11 =
INCLUDE_MISC =  -Itmndec -Itmn-x -Ih263

STATIC = -static
MKDEP = ./mkdep
LIBRARY_TK = /usr/lib/tk8.0
LIBRARY_TCL = /usr/lib/tcl8.0
TK_LIBRARY_FILES = \
                $(LIBRARY_TCL)/init.tcl \
                $(LIBRARY_TK)/tk.tcl \
                $(LIBRARY_TK)/button.tcl \
                $(LIBRARY_TK)/dialog.tcl \
                $(LIBRARY_TK)/entry.tcl \
                $(LIBRARY_TK)/focus.tcl \
                $(LIBRARY_TK)/listbox.tcl \
                $(LIBRARY_TK)/menu.tcl \
                $(LIBRARY_TK)/palette.tcl \
                $(LIBRARY_TK)/scale.tcl \
                $(LIBRARY_TK)/tearoff.tcl \
                $(LIBRARY_TK)/text.tcl \
                $(LIBRARY_TK)/optMenu.tcl $(LIBRARY_TK)/scrlbar.tcl

LIB_GRABBER =
INCLUDE_GRABBER =
OBJ_GRABBER =
SRC_GRABBER = $(OBJ_GRABBER:.o=.cc)
OBJ_XIL =
OBJ_CRYPT = qfDES.o qfDES_key.o qfDES_memory.o
LIB = $(LIB_GRABBER) -L/usr/lib -ltk8.0 -L/usr/lib -ltcl8.0
-L/usr/X11R6/lib -lXext -lX11  -lnsl -
ldl \
        tmndec/libh263.a tmn-x/libh263coder.a -lm
INCLUDE = $(INCLUDE_MISC) $(INCLUDE_GRABBER) $(INCLUDE_TK) $(INCLUDE_TCL) \

        $(INCLUDE_X11) $(MD_INC) -I./jpeg -I./p64 -I.
DEFINE =  -DUSE_SHM -DED_YBITS=$(ED_YBITS) -DSIGRET=void
BFLAGS = $(DEFINE) $(INCLUDE)
CFLAGS = $(CCOPT) $(BFLAGS)
.......
LIB_CB = -L/usr/lib -ltk8.0 -L/usr/lib -ltcl8.0 -L/usr/X11R6/lib -lXext
-lX11  -lnsl -ldl -lm
OBJ_CB = cbAppInit.o cb.o confbus.o group-ipc.o iohandler.o \
        net.o net-ip.o crypt.o crypt-dull.o $(OBJ_CRYPT) communicator.o \
        ppm.o Tcl.o Tcl2.o inet.o md5c.o
.......

When I change -ltk8.0 for /usr/lib/libtk8.0.so and -ltcl8.0 for
/usr/lib/libtcl8.0.so in the two lines LIB = ...  and LIB_CB = .....
Here is what I get:

 -L/usr/lib /usr/lib/libtk8.0.so -L/usr/lib /usr/lib/libtcl8.0.so
-L/usr/X11R6/lib -lXext -lX11  -lnsl -ldl tmndec/libh263.a
tmn-x/libh263coder.a -lm -static
/usr/X11R6/lib/libXext.a(extutil.o): In function `_default_exterror':
extutil.o(.text+0x3db): undefined reference to `_IO_stderr_'
/usr/X11R6/lib/libX11.a(OpenDis.o): In function `XOpenDisplay':
OpenDis.o(.text+0x501): undefined reference to `_IO_stderr_'
OpenDis.o(.text+0x528): undefined reference to `_IO_stderr_'
OpenDis.o(.text+0x5c7): undefined reference to `_IO_stderr_'
OpenDis.o(.text+0x5d1): undefined reference to `_IO_stderr_'
/usr/X11R6/lib/libX11.a(OpenDis.o)(.text+0x5e9): more undefined references
to `_IO_stderr_' follow
/usr/lib/libtcl8.0.so: undefined reference to `_IO_stdout_'
collect2: ld returned 1 exit status
make: *** [vic] Error 1


Thanks,
    Pierre.

Reply via email to