[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

Re: [CPROG] Link med Xforms?



On Mon, 5 Apr 1999, Martin Skøtt wrote:

> Jeg antager at der er fordi at ld ikke kan finde libforms.a filen som ligger i
> /usr/X11R6/lib/. Jeg har derfor prøvet at til føje -L/usr/X11R6/lib/ -lforms
> til gcc kommandoen, men det resulterer i:
>     <En hel masse linjer i stil m. flg:>
>     /usr/X11R6/lib//libforms.so: undefined reference to `XCreateGC'
>     /usr/X11R6/lib//libforms.so: undefined reference to `XOpenDisplay'	
>     /usr/X11R6/lib//libforms.so: undefined reference to `XMapRaised'

Det er rigtigt, men du skal ogsaa have nogle X biblioteker med. Proev med:

gcc -I/usr/X11R6/include -o hello -L/usr/X11R6/lib -lforms -lX11

Er du sikker paa at der ikke staar noget i XForms manuelen om hvike X
biblioteker det kraever? Hvis du flere undefined references kan du finde
ud af hvilket bibliotek de er i ved at bruge "nm". For eksempel:

/usr/X11R6/lib$ nm -o *.so | grep XCreateGC | grep T
libX11.so:00015a78 T XCreateGC

for at linke "libX11.so" skal du saa have -lX11 med paa kommandolinien.


> Det er min bedste overbevisning at man bare skulle kunne klare den med:
>     gcc -forms -o hello hello.c

-forms er altsaa ikke noget gyldigt gcc flag :)

-- 
==============================================================================
Erwin Andreasen   Herlev, Denmark <sslug@sslug>          UNIX System Programmer
<URL:http://www.andreasen.org>              <*>         (not speaking for) DDE
==============================================================================



 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2005-08-10, 20:07 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *