> I am posting this in the hopes that one other ignorant dilettante will
> be spared what I just went through.

See, this is why I can't abide IDE's - they are supposed to make things
easier, but just make things harder.

Really, it is *not* this complicated...

If you use a Makefile that calls fltk-config to get all the local
settings:

    http://www.fltk.org/articles.php?L599

And that one Makefile will work with *any* reasonable toolchain (*nix,
OSX, Msys/mingw, cygwin, yadda, yadda...) so none of this tedious
reconfiguring for each IDE as you move from platform to platform...

If you have to use the IDE, can you not just get it to call your
Makefile (I know Xcode can do that, and I'm pretty sure Eclipse can too)
and save yourself a whole world of pain.

Anyway, some other comments below, in the hope that they might be
helpful...


> Click MinGW C++ Linker.  Change the command from g++ to gcc -mwindows.
> Do not use ld!  The -mwindows gets rid of the pesky DOS console
window.

Nope: leave the command as "g++", do not change it to "gcc", since that
subtly alters the behaviour of the gcc linker when faced with C++ code,
using "g++" is the "better" option.

Adding the "-mwindows" is fine. That said, I'd be adding it to some
"linker options" rather than embedding it into the "linker command" -
though I do not know how your version of Eclipse exposes these features.


> Then go to Libraries, and add under Library search path (-L)
> C:\MinGW\lib (obvious).  Under Libraries (-l) add:
> 
> (these 4 were shown by fltk-config --ldflags in msys)

See - if you know how fltk-config works, why can you not just leverage
it to build your project directly? ;-)


> stdc++

I *think* you only need to add this because you linked using "gcc"
rather than "g++" - you should find that if you link using "g++" the
C++-stuff is better at sorting itself out.

Also, you *might* want to consider explicitly adding the winsock library
to your link (-lws2_32 IIRC) just to be on the safe side, though
fltk-1.3 will probably load that dynamically if it needs it anyway...

Though my strong recommendation is just to have a simple Makefile and
just have the IDE call that directly (in my experience, all that Eclipse
does is write its own Makefile anyway, in a really scrappy style that is
hard to read - so why not just provide it with a nice one that actually
does what you want?)



SELEX Galileo Ltd
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
fltk@easysw.com
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to