On 25 Oct 2009, at 1:39, Dick Gilberg wrote:

> I have just installed fltk (fltk-1.1.10rc2) in Vista running in  
> Parallels on a Mac. The installation was successful (at least  
> according to the messages) and all 71 projects were compiled.

 From the errors you posted below, it looks as if the compilation was  
not a success. Those are not run-time errors, those are build time  
(in fact, link-time, specifically) errors.

It looks as if the link has not managed to find the fltk libraries -  
I can only guess that something is up with your paths, or something?


> When I try to run the "Hello World" test program, however, I get 11  
> unresolved external symbol messages.

Yup, the test program has not linked against the fltk lib.

> Reviewing the previous forums, this seems to be a rather common  
> problem, except that I'm getting it with the test program, which  
> most others seem to be beyond.

Not a common problem at all - although I concede there are a fair  
number of posts (mainly against fltk-2 rather than fltk-1.x) of  
people having link time errors.
(If I were being harsh, I would perhaps hint that the majority of  
these problems are "finger trouble" caused by the posters not having  
their build environment set up correctly for their projects.)
However, since you have not even got so far as trying to build your  
project, we need to look into that in some more detail and see why  
that might be.

> One common solution involves including the fltkdll.dll and  
> fltkdlld.dll files. This may be a problem since when I search the  
> visualc files, I can't find them.

That would only be relevant if you were building your application to  
use dynamic linking. The default fltk build of the lib, and the test  
programs, uses static linking, so you should not be doing dynamic  
linking here, and you will not have built the DLL files.
So, this is not likely to be relevant to you.

> Here are the messages:
> Linking...
> GUI.obj : error LNK2019: unresolved external symbol "public: static  
> int __cdecl Fl::run(void)" (?...@fl@@SAHXZ) referenced in function  
> _main
> GUI.obj : error LNK2019: unresolved external symbol "public: void  
> __thiscall Fl_Window::show(int,char * *)" (? 
> s...@fl_window@@qaexhpa...@z) referenced in function _main
> GUI.obj : error LNK2019: unresolved external symbol "public: void  
> __thiscall Fl_Group::end(void)" (?...@fl_group@@QAEXXZ) referenced  
> in function _main
> GUI.obj : error LNK2019: unresolved external symbol "enum  
> Fl_Labeltype __cdecl fl_define_FL_SHADOW_LABEL(void)" (? 
> fl_define_FL_SHADOW_LABEL@@YA?AW4Fl_Labeltype@@XZ) referenced in  
> function _main
> GUI.obj : error LNK2019: unresolved external symbol "public:  
> __thiscall Fl_Window::Fl_Window(int,int,char const *)" (?? 
> 0Fl_Window@@q...@hhpbd@Z) referenced in function _main
> GUI.obj : error LNK2019: unresolved external symbol "protected:  
> __thiscall Fl_Widget::Fl_Widget(int,int,int,int,char const *)" (?? 
> 0Fl_Widget@@i...@hhhhpbd@Z) referenced in function "public:  
> __thiscall Fl_Box::Fl_Box(int,int,int,int,char const *)" (?? 
> 0Fl_Box@@q...@hhhhpbd@Z)
> GUI.obj : error LNK2001: unresolved external symbol "protected:  
> virtual void __thiscall Fl_Box::draw(void)" (?d...@fl_box@@MAEXXZ)
> GUI.obj : error LNK2001: unresolved external symbol "public:  
> virtual int __thiscall Fl_Box::handle(int)" (?han...@fl_box@@ua...@z)
> GUI.obj : error LNK2001: unresolved external symbol "public:  
> virtual void __thiscall Fl_Widget::resize(int,int,int,int)" (? 
> res...@fl_widget@@uaexh...@z)
> GUI.obj : error LNK2019: unresolved external symbol "public:  
> virtual __thiscall Fl_Widget::~Fl_Widget(void)" (?? 
> 1Fl_Widget@@u...@xz) referenced in function "public: virtual  
> __thiscall Fl_Box::~Fl_Box(void)" (??1Fl_Box@@u...@xz)
> C:\Documents and Settings\Owner\My Documents\Visual Studio 2008 
> \Projects\GUI\Debug\GUI.exe : fatal error LNK1120: 10 unresolved  
> externals
> Build log was saved at "file://c:\Documents and Settings\Owner\My  
> Documents\Visual Studio 2008\Projects\GUI\GUI\Debug\BuildLog.htm"
> GUI - 11 error(s), 0 warning(s)
>
> Can anyone steer me down the correct path?

I'm not strong on the VS stuff - others might need to fill in the  
details for that - but it looks as if you are doing a debug build of  
the fltk library and are then trying to link the test programs, and  
they are failing.

The link fails because the linker can not locate the fltk lib. If you  
are using VS in debug mode, I expect that the (static) fltk lib would  
be called something like fltkd.lib (the non-debug release version  
would of course be called fltk.lib.)

Can you confirm that there is a fltkd.lib in your projects lib  
folder? And that the path that the IDE is passing to the linker  
correctly points to that folder?

If the lib folder only contains the non-debug fltk.lib (et al) files,  
then I guess you must have built the lib in release mode.
The MS VS tools are a bit brain dead that way, such that if you ask  
for a debug build, it will choke if it doesn't find the debug lib,  
even if there is a perfectly good release lib sitting right there  
that it could use instead...

Anyway - be assured that many others have built fltk-1.1.10 on Vista  
(indeed I do that myself - but not using the VS tools and not in a VM!)

I don't imagine running in the VM makes that much difference? It  
ought not, anyway...



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

Reply via email to