> > Does your program run in debug mode from within the IDE? > The ACTIVE target with /MD and fltk.lib runs when I go to the MS VC++ Express > menu and click debug->Start debugging. > > Why are we supposed to use /NODEFAULTLIB:MSVCRT (D)?? I don't fully > understand how it works in conjunction with the rest.
Normally, you should not need /NODEFAULTLIB:MSVCRT. It is required, for example, when you use a library that was built to link against msvcrt.dll, but your code links against msvcr80.dll. the end result is that both the library and your code will resolve C-runtime calls using msvcr80.dll. Same goes for msvcpxx.dll. Having an executable that is linked against different C/C++ runtimes can lead to crashes. For example, the library calls the "new" operator to create a widget (allocated using one c++ DLL), and your application calls the delete operator on the widget using the other c++ DLL. The two DLLs maintain a separate list of allocated memory blocks, so you are passing a bad memory address. I expect that there are other caveats, such as calling stream funtions, strdup()/free() etc. Personally, I never use debug versions of third-party libraries (not always available either), and my debug code always uses the release version of the c-runtime library (do I really need to debug printf()?). I am only concerned with debugging my application code. Don. _______________________________________________ fltk mailing list [email protected] http://lists.easysw.com/mailman/listinfo/fltk

