CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    May 1999
    Posts
    10

    __fltused already defined in StdAfx.obj

    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.



  2. #2
    Join Date
    May 1999
    Posts
    10

    Re: __fltused already defined in StdAfx.obj

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured