First, thank you for a such a detailed reply.
One of your questions involved the fltkd.lib. It was and is located in the
project project's lib folder, specifically:
My Documents
Visual Studio 2008
Projects
GUI-2 // The test program from the documentation (page 9)
fltk-1.1.10rc2
lib
fltkd.lib
I have also set the Visual C++ tools>options>Include files and the Library
files to point to the fltk-1.1.10rc2 folder. The path for the library is:
C:\Documents and Settings\Owner\My Documents\Visual Studio
2008\Projects\fltk-1.1.10rc2
I have the same path in the Include file and it works so I'm assuming that the
library path is correct even though it doesn't work.
The reason it took so long to answer is that I moved the fltk-1.1.10rc2 folder
to the projects folder (previously is was directly below the Visual Studio's
folder), and in doing so everything stopped working. It took me a couple of
downloads and some trial and error to get it back to the same point.
You also had a comment about the debug mode. I believe I am in the debug mode.
From your notes, this appears to be correct because the library file is in fact
fltkd.lib. The non-debug version is not in the lib folder.
One other interesting point. At the end of the last compile, I did something
that caused fltk to execute and got a cube(?) window. This was not the test
program from the documentation but something different. At any rate, it
indicated to me that the build was good.
When I compile, I save the log file information. While the final message says
compiled with no errors and no warnings, I spotted an intermediate step warning
that sounds like it could be the problem. Here's the message:
------ Rebuild All started: Project: fltkdll, Configuration: Debug Win32 ------
Deleting intermediate and output files for project 'fltkdll', configuration
'Debug|Win32'
Compiling...
..[lots of line]...
filename_setext.cxx
filename_match.cxx
filename_list.cxx
filename_isdir.cxx
filename_ext.cxx
filename_expand.cxx
filename_absolute.cxx
Generating Code...
Compiling manifest to resources...
Microsoft (R) Windows (R) Resource Compiler Version 6.1.6723.1
Copyright (C) Microsoft Corporation. All rights reserved.
Linking...
Creating library .\../test/fltkdlld.lib and object .\../test/fltkdlld.exp
LINK : warning LNK4098: defaultlib 'LIBCMTD' conflicts with use of other libs;
use /NODEFAULTLIB:library
fltkzd.lib(adler32.obj) : warning LNK4099: PDB 'vc90.pdb' was not found with
'..\lib\fltkzd.lib' or at 'C:\Documents and Settings\Owner\My Documents\Visual
Studio 2008\Projects\fltk-1.1.10rc2\visualc\vc90.pdb'; linking object as if no
debug info
[there are many more lines of the same ilk.]
The last line "linking object as if no debug info" sounds ominous. However, I
have no idea what it means or what to do about it.
Does it mean anything to you?
Once again, thanks for your help.
Dick
>
> 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