Hi Albrecht, I gotta be going because I won't get the bus if I don't leave office now. Tomorrow is the last day of weekend but I'll come to the office. If you can find a solution then do please post it.
Thanks & best regards On Sat, May 21, 2011 at 9:20 PM, asif saeed <[email protected]> wrote: > Hi Albrecht, > > I get the following errors: > > > 1>MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol > _WinMain@16 referenced in function ___tmainCRTStartup > 1>E:\scratch\tt\Release\tt.exe : fatal error LNK1120: 1 unresolved > externals > > If I change Linker/System/Subsystem to Console, it builds fine but displays > a debug/DOS window. > > Thanks & regards, Asif > > > > On Sat, May 21, 2011 at 9:16 PM, asif saeed <[email protected]> wrote: > >> Hello Albrecht, >> >> I didn't add "fltkdll.lib" in Properties/Linker/Input/Additional >> Dependencies. Why do I need to add this lib file. I am going to do this >> anyway but I'd be thankful if you could tell me the reason it needs to be >> added. >> >> Thanks & best regards, Asif >> >> >> >> >> On Sat, May 21, 2011 at 8:46 PM, Albrecht Schlosser < >> [email protected]> wrote: >> >>> On 21.05.2011 17:01, asif saeed wrote: >>> > Hello Albrecht, >>> > >>> > This time,after defining FL_DLL as a preprocessor symbol, I got the >>> > following errors: >>> >>> Did you *also* define "WIN32" ? >>> >>> > 1>tt.obj : error LNK2019: unresolved external symbol >>> "__declspec(dllimport) >>> > public: static int __cdecl Fl::run(void)" (__imp_?run@Fl@@SAHXZ) >>> referenced >>> > in function _main >>> ... >>> > 1>E:\scratch\tt\Release\tt.exe : fatal error LNK1120: 24 unresolved >>> > externals >>> >>> Okay, "__declspec(dllimport)" and "__imp_" show that you do in fact try >>> to link with the dll version (FL_DLL is defined). Okay. >>> >>> > Apparently, the linker cannot find the dll. Even though I have placed >>> it in >>> > the same directory where the EXE is supposed to be created. >>> >>> No, the linker doesn't need nor does it look for the .dll file. >>> The linker needs the .lib file! IIRC I explained this already. >>> You need the .dll files when you want to run the executable. >>> >>> > Any help now? >>> >>> (1) check whether you defined "WIN32" (see above) >>> >>> (2) check whether you defined the dependencies correctly: >>> (2a) add "fltkdll.lib" in >>> Properties/Linker/Input/Additional Dependencies >>> right before comctl32.lib >>> (there should not be other fltk*.lib files in this line) >>> (2b) add "<path-to-fltk>/test" in >>> Properties/Linker/General/Additional Library Directories >>> (replace or remove "<path-to-fltk>/lib" if it is there). >>> >>> Please report *everything* you do so that I can help you better. >>> >>> And, again, please remove all fltkdll.dll files you copied until >>> you got the build working. Then, when you are ready to run the >>> program, try it first w/o copying the fltkdll.dll file. This >>> ought to issue an error message. Then copy only *one* fltkdll.dll >>> file into the *same* directory where you built your test .exe file. >>> Start it again: it should work. >>> >>> Albrecht >>> _______________________________________________ >>> fltk mailing list >>> [email protected] >>> http://lists.easysw.com/mailman/listinfo/fltk >>> >> >> > _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

