the problem continues :-(

Clemens Kirchgatterer clemens at root.at
Mon Nov 26 16:45:56 PST 2001


Pablo Hörtner wrote:
> 
> sorry, i thought i wouldn't go to disturb you any more with my silly questioning but:
> 
> gcc  nalfs.o parser.o win.o utility.o child.o editor.o handler.o timer.o handlers/handlers.a  -lform -lncurses -lexpat -o
> nALFS
> /usr/bin/ld: cannot find -lexpat
> collect2: ld returned 1 exit status
> make[1]: *** [nALFS] Fehler 1
> make[1]: Verlassen des Verzeichnisses Verzeichnis »/home/My Distro/LFS/nALFS/src«
> make: *** [src] Fehler 2

have you done (as root) "ldconfig" after installing expat? 


> i promise you i'm going to read the c++ howto but meanwhile
> it would be usefull to know how to tell the linker where the
> expat-header is situated. doesn't the linker always search
> in /usr/include by default?

you are mixing up ither gcc (compiler) and ld (linker) or include files
(*.h) and libs (*.so). the compiler doesn't care about libs and the
linker doesn't look at header files.
 
> [root at redtux nALFS]# ld -l expat
> ld: cannot find -lexpat

expat.so is not in ld's search path. if the lib is installed correctly,
one must execute ldconfig afterwards, so the lib gets registerd in its
cache file (/etc/ld.so.cache).

> [root at redtux nALFS]# ld -l expat.h
> ld: cannot find -lexpat.h

what should the linker do with a header file? see statement above.
 
> [root at redtux nALFS]# ld -L /usr/include/ -l expat.h
> ld: cannot find -lexpat.h
> [root at redtux nALFS]# man ld
> [root at redtux nALFS]# ld -Ll /usr/include/expat.h
> /usr/include/expat.h: file not recognized: File format not recognized
> 
> did neither (i just tried everything i found - no idea whether the syntax i used is correct!! :-) )

i will not comment on this try! ;-))

best regards ...
clemens
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe alfs-discuss' in the subject header of the message



More information about the alfs-discuss mailing list