[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
 

Link med Xforms?



Hej
Jeg er rimeligt ny i C verdenen og jeg prøver at compilere flg. program med
Xforms som jeg har fundet på http://bragg.phys.uwm.edu/xforms:
#include "forms.h"
main(int argc, char *argv[])
{
  FL_FORM *simpleform;

  fl_initialize(&argc, argv, 0, 0, 0);

  simpleform = fl_bgn_form(FL_UP_BOX,230,160);
  fl_add_button(FL_NORMAL_BUTTON,40,50,150,60,"Hello, World");
  fl_end_form();

  fl_show_form(simpleform,FL_PLACE_MOUSE,FL_NOBORDER,"name");
  fl_do_forms();
  return 1;
}
Jeg prøver at compilere med:
    gcc -I/usr/X11R6/include/ -o hello hello.c
Det resulterer i flg. fejl:
    /tmp/cca015401.o: In function `main':
    /tmp/cca015401.o(.text+0x15): undefined reference to `fl_initialize'
    /tmp/cca015401.o(.text+0x29): undefined reference to `fl_bgn_form'
    /tmp/cca015401.o(.text+0x48): undefined reference to `fl_add_button'
    /tmp/cca015401.o(.text+0x50): undefined reference to `fl_end_form'
    /tmp/cca015401.o(.text+0x62): undefined reference to `fl_show_form'
    /tmp/cca015401.o(.text+0x6a): undefined reference to `fl_do_forms'
Jeg har installeret både Xforms og Xforms-devel rpmerne og Lyx som bruger 
Xforms virker fint. Er der nogen som kan hjælpe mig lidt frem i denne gcc 
verden??
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 min bedste overbevisning at man bare skulle kunne klare den med:
    gcc -forms -o hello hello.c
Så siger gcc at den ikke kan finde forms.h
ld kender godt til forms biblioteket:
sslug@sslug xforms]# ldconfig -p | grep form
        libforms.so.0.88 (ELF-libc6) => /usr/X11R6/lib/libforms.so.0.88
        libforms.so (ELF-libc6) => /usr/X11R6/lib/libforms.so
        libform.so.4 (ELF-libc6) => /usr/lib/libform.so.4
        libform.so.4 (ELF-libc6) => /usr/lib/libform.so.4
        libform.so.3.0 (ELF-libc5) => /usr/i486-linux-libc5/lib/libform.so.3.0
        libform.so (ELF-libc6) => /usr/lib/libform.so
        libform.so (ELF-libc6) => /usr/lib/libform.so

Det var en værre smøre, men jeg håber at der er nogen som kan hjælpe. :-)
-- 
Med venlig hilsen
Martin Skøtt
sslug@sslug


 
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] *