
Enabling Exception handling causes Linker error, help!
Are you using VC6.0? If so, it'smost likely a known problem with the default ATL
project created. If you use a CRT function that requires the CRT startup code,
you'll get the error, because by default, the project has _ATL_MIN_CRT defined.
To remove it, go to project -> settings -> C/C++ and remove the _ATL_MIN_CRT
definition from the "Preprocessor Definitions" box.
--
Tomas Restrepo
http://members.xoom.com/trestrep/
Quote:
> Hello,
> I am compiling a sample project I got from a book on ATL COM. It is a
> simple ATL COM object with Dual Interfaces that compiles and links to a
> DLL successfully. If I do nothing else but enable "Enable Exception
> Handling" from the project settings window, I get the following linker
> error:
> Linking...
> Creating library ReleaseUMinDependency/Simple.lib and object
> ReleaseUMinDependency/Simple.exp
> LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> ReleaseUMinDependency/Simple.dll : fatal error LNK1120: 1 unresolved
> externals
> Error executing link.exe.
> I need to enable exception handling because I intend to use the STL in
> modifications I am going to make to the sample project. Can anyone tell
> me why this is happening and how to fix it?
> Thanks.