Click to See Complete Forum and Search --> : __fltused already defined in StdAfx.obj


VestyBoy
June 10th, 1999, 04:30 PM
Visual C++ 6.0
When I go to compile my ATL project in 'Release MinSize' (defined by project wizard when project created) I get linker errors:

LIBCMT.lib(fpinit.obj) : error LNK2005: __fltused already defined in StdAfx.obj
LIBCMT.lib(crt0.obj) : error LNK2001: unresolved external symbol _main

I have no problems when I compiled in Debug.
I think this is due to the _ATL_ preprocessor symbols but I am not sure. Does anyone have any info on this.

Thanks,
Dave V.

VestyBoy
June 10th, 1999, 04:46 PM
Okay, after a bit more ready I think I can see what the problem is. Because ATL tries to keep the EXE as small as possible it includes preprocessor symbols such as _ATL_MIN_CRT (I recommend reading the MSDN help on _ATL_MIN_CRT). However if you are using CRT functions this will cause a problem (e.g. strcmp).

The solution is to either use the Win32 equivalent or remove the _ATL_MIN_CRT preprocessor line.

Dave V.