On 21.05.2011 15:24, asif saeed wrote: > I built in release configuration (with multi-byte character set) the > following projects in order: > > fltkjpeg > fltkpng > fltkzlib > fltkdll (I built fltkdll separately) > > This created .lib files for jpeg, png and zlib in the fltk-1.3.x-r8514\lib > directory and an fltkdll.dll in fltk-1.3.x-r8514\test directory.
okay so far ... > Then > 1) I created a new empty win32 application .exe project. > 2) set the configuration to Release > 3) specified multi-byte character-set in the Configuration > Properties/General Why do you do this? You'd better only do one step after the other. If it is not necessary, don't do it. But I don't say that this matters here... > 4) put "E:\libs\fltk-1.3.x-r8514" in the C++/General/Additional > Include Directories > 5) specified "E:\libs\fltk-1.3.x-r8514\lib" in > Linker/General/Additional Library Directories > 6) specified "comctl32.lib" in Linker/Input - according to the > online docs. > 7) set Linker/System/Subsystem to Windows (/SUBSYTEM:WINDOWS) okay. > I got the following errors: > > > 1>tt.obj : error LNK2019: unresolved external symbol "protected: __thiscall > Fl_Widget::Fl_Widget(int,int,int,int,char const *)" (??0Fl_Widget@ > @IAE@HHHHPBD@Z) referenced in function "public: __thiscall > Fl_Box::Fl_Box(int,int,int,int,char const *)" (??0Fl_Box@@QAE@HHHHPBD@Z) > 1>tt.obj : error LNK2001: unresolved external symbol "protected: virtual > void __thiscall Fl_Box::draw(void)" (?draw@Fl_Box@@MAEXXZ) ... > 1>E:\scratch\tt\Release\tt.exe : fatal error LNK1120: 13 unresolved > externals You missed probably two more points in your project's setup: (1) you must define "WIN32" for all FLTK projects (2) you must define "FL_DLL" if you want to link with the dll version You can do this in the compiler/c++ setup (I don't know the exact menu names), there you can define additional macros or something like this. > I also specified the directory E:\libs\fltk-1.3.x-r8514\test in the > operating system's PATH variable and put fltkdll.dll in every sub-directory > under the project directory tree. Again, don't do this (and you'd better delete all these fltkdll.dll copies, because you'd otherwise have old copies somewhere, and you never know which one is used). If you changed the OS PATH variable, you may need to reboot (I don't know, and I won't try this for you), but it is much easier to copy fltkdll.dll *only* to the same directory where you built your own application (.exe file). You may also need the other 3 .dll files you mentioned above, but I'm not sure. > I hope you can help me get these errors fixed. Okay, let's try this, and do only the steps I wrote above. Do not rebuild fltk(dll), since this is probably okay. I'm not sure if and where these compiler macros are defined, but please add them to your project for now, and let's see that later. If it doesn't work, please post your error messages again, and describe what you did so far. HTH Albrecht _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

