Compiling wxWidgets sample apps with Visual C++ 2005 Express

To get wxWidgets to install with Visual C++ 2005 Express, I needed to change the linker options to set Incremental=No.

Otherwise, I was getting this Linker Error
CVTRES : fatal error CVT1100: duplicate resource. type:MANIFEST, name:1, language:0x0409
LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

Tags: ,

9 Responses to “Compiling wxWidgets sample apps with Visual C++ 2005 Express”

  1. Chris Morley says:

    I had the same problem. I tried keeping the linking Incremental and edited a line in wx.rc. Changing the 1 in the line:
    1 24 “wx/msw/wx.manifest”
    to something else (I used 2) allowed it to link and run. I don’t know if anything else gets broken because of this.
    According to the documentation, the linker option /TLBID:2 ought to work as well, but it doesn’t for me with the Express Version.

  2. The “official” way of doing this is to #define wxUSE_NO_MANIFEST=1 in the project settings. That way you don’t have to edit wx.rc and can still use incremental linking.

    More info over at my blog: litwindow.blogspot.com

    Best regards
    Hajo

  3. nik dehoumon says:

    fix it by upgrading the ID in the resource file. ( from 2 to 65535)

  4. JC says:

    I was compiling an OPENGL sample and I turned off “manifest generation” and that seemed to work!

  5. Eugene says:

    I ran accross this today. The project was from earlier version of VS though and when it converted it, it gave a couple of warnings and one of them was about the manifest:
    Due to the requirement that Visual C++ projects produce an embedded (by default) Windows SxS manifest, manifest files in the project are automatically excluded from building with the Manifest Tool. It is recommended that the dependency information contained in any manifest files be converted to “#pragma comment(linker,”")” in a header file that is included from your source code. If your project already embeds a manifest in the RT_MANIFEST resource section through a resource (.rc) file, the line will need to be commented out before the project will build correctly.

  6. jay says:

    i solved this problem

    1. project property -> manifest tool -> include manifest : yes -> no
    2. rebuild

    that’s it!!

    good luck~

  7. Michael Ost says:

    jay’s solution worked for me, but isn’t a manifest actually needed for something? %)

    Hajo’s solution worked too:
    #define wxUSE_NO_MANIFEST 1
    #include

    Maybe we’ll all figure out what microsoft is up to with these manifests one day! … mo

  8. Zbyl says:

    Like Hajo said – add a #define “wxUSE_NO_MANIFEST=1″ – but to the Resource compiler’s definitions (Project>Properties>Configuration Properties>Resources>General>Preprocessor Definitions), not simply C++ preprocessor definitions!

  9. Robert Dunnill says:

    I fixed this problem in a Code Project WTL demo by commenting out the manifest resource in the resource file.

Leave a Reply