> > I ve try to install fltk-utf8 and then fltk2.

Which fltk-utf8? There are several going around.

> > I was not happy with the result so I uninstall it and reinstall fltk
> > 1.1.7 on my Ubuntu.

What were you unhappy with?
If you can identify problems, I'm sure we'd love to know.

Also - you are almost certainly better getting one of the 1.1.8 weekly 
snapshots, rather than 1.1.7, ans there are many small fixes since 1.1.7.

> > [EMAIL PROTECTED]:~/filtre$ g++ pad.cpp -o pad `fltk-config --ldflags
> > --cxxflags` -ljpeg -lfltk_images
> > /tmp/ccbxwcyl.o:(.rodata._ZTV13Fl_JPEG_Image[vtable for
> > Fl_JPEG_Image]+0x2c): undefined reference to
> > `Fl_RGB_Image::to_rgba(unsigned char*)'
> > collect2: ld a retourné 1 code d'état d'exécution
> > 
> > When I remove the  Fl_JPEG references in my code, it work 
> but I have a
> > segmentation fault.


The "to_rgba" method only exists in OkisD's fltk-1.1.6-utf8 port, if I recall 
correctly, so you must still have some of his fltk-utf8 port in your build. 
Either you are linking code that was compiled against his header files, or you 
are still linking in the old libraries or something.
You can not use the "to_rgba" method with other fltk versions - they provide 
other means to do alpha blended imaging instead.


> > Did you have any ideas to resolve my problem?

- Clean out all the previous installs properly, including cleaning your own 
build tree in case it is "contaminated" (e.g. rm *.o)

- Install one of the fltk-1.1.8 weekly snapshots

- Form you link line correctly (see below)

> Try passing --use-images to fltk-config and remove the -ljpeg 
> switch. Oh,
> IIRC, order matter with g++ so cflags should be declared first before
> the .cpp and libs should be declared at the end?

Order does matter to gcc, but mainly in so far as it affects the order of 
linking of libraries. The order in which the command options and so forth is 
passed only matters in so far as it affects each compilation unit on the 
command line.

So, when it comes to link order, you need to list the item that uses a function 
*before* the library that provides that function. Specifically, in this case 
-lfltk_images must be listed before -ljpeg (rather than before it, as in the 
OP's example line.)

> Something like:
> 
>    g++ `fltk-config --use-images --cxxflags` pad.cpp -o pad \
> `fltk-config --use-images --ldflags`
> 
> That will make sure all the cflags and libs that fltk requires will be
> specified.

I'd probably go with:

        g++ pad.cpp -o pad `fltk-config --use-images --cxxflags` \
        `fltk-config --use-images --ldflags`

But that should amount to the same thing anyway, in this case.



SELEX Sensors and Airborne Systems Limited
Registered Office: Sigma House, Christopher Martin Road, Basildon, Essex SS14 
3EL
A company registered in England & Wales.  Company no. 02426132
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to