On Sat, Oct 10, 2009 at 5:17 PM, imacarthur <[email protected]> wrote: > > On 10 Oct 2009, at 14:23, Francesco wrote: >> >> please bear with me as these are my first steps with FLTK and my >> problems are likely to be trivial. > > It sounds like the paths to the tools are at issue... > >> I've downloaded and unpacked 1.1.10rc2, I've been able to compile it >> by importing the "fltk.lib.dsp" project into the Code::Blocks IDE (I'm >> on WinXP). >> >> So far so good, the static library has been correctly built and I've >> been able to test it with the two wizard projects that come within >> Code::Blocks, both the "simple main" one and the "fluid" one. >> >> Notice that I have unpacked the archive in "D:\fltk-1.1.10rc2". > > Ought not to matter. > > >> In order to use the static library and the headers within the >> Code::Blocks wizard projects I did these steps: >> - fed the above path as base path for FLTK projects >> - created an "include" folder and moved the FL folder into it > > Why? > Would it not be easier just to leave things where they are and tell your IDE > to add the existing fltk folder to its include path? > > Also: Literally "moved" or just "copied"? Copied is probably OK, but > actually moving them might break assumptions that the fltk project files are > making (they make assumptions about the relative positions of the fltk > folders and so forth...) > >> - pasted the "fltk.lib" static library into the existing "lib" folder > > Again, easier just to tell the IDE to add the fltk lib folder to its list of > lib folders. Moving (or even copying) the built objects is not necessary, > and possibly "hazardous". > >> >> Now I'm trying to build fluid by importing "fluid.dsp". >> The compile process went fine, but I got several linking errors. Some >> of them have been solved by linking it against the static FLTK library >> I've previously built, but I still get linking errors: > > The linker settings must be wrong, it's not finding/linking in the fltk > libs. > > >> I suppose I have to build the stuff inside of the "png" folder as a >> further static library and link fluid with that too, > > That depends: if your system already has the png, zlib and jpeg libs > installed (most XP systems do not, but your IDE may have installed them) > then you can use those - the ones bundled with fltk are a fall-back for > systems that do not already have them. > > >> but it seems >> strange that I'm getting those other "core" undefined reference errors >> (Fl_group, Fl_Help_Dialog, Fl_File_Icon). > > This looks a lot like path issues, to be honest. > >> I've noticed that inside of "config.h" there is a path macro that >> defaults to "C:\FLTK" - obviously this doesn't match my current >> settings. Do you suggest me to change it to "D:\fltk-1.1.10rc2" or it >> would be better to move all of this folder's contents into "C:\FLTK"? > > It's mainly only used for a few things building the lib (e.g. the > Fl_Help_View demo uses it to find the installation folder) so it could be > useful to update it and rebuild things, but I think that will not be what is > causing your problem here. > > On XP, Code::Blocks uses the mingw compiler tools I think? If so, this howto > (using Msys + mingw) might help get the image libs and so forth correctly > built for your system. > > http://www.fltk.org/articles.php?L598 > > Once built you can use the libs with Code::Blocks etc as normal.
Sorry, I must have messed up a lot of things, moving them around. I'll start from scratch following the tutorial you linked (yes, I'm using MinGW, I'll get Msys and DTK ) - I'm new to "make"-ing things, I'll try to get a grip. Thanks a lot, I hope to get back here (successfully) soon. -- Francesco S. Carta, http://fscode.altervista.org _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

