Including manifest file gives warning

Do you have a typical platform dependent issue you're battling with ? Ask it here. Make sure you mention your platform, compiler, and wxWidgets version.
Post Reply
Wanderer82
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Jul 26, 2016 2:00 pm

Including manifest file gives warning

Post by Wanderer82 »

Hi

I'm trying to write an updater for my program. As all .exe files which contain the word "update" or "setup" wants to execute them with admin writes I wrote a manifest file to override this. But I get the warning:

windres.exe -IC:\wxWidgets-3.1.0\include -IC:\wxWidgets-3.1.0\lib\gcc_dll\mswu -IC:\wxWidgets-3.1.0\include -J rc -O coff -i C:\Users\Thomas\DOCUME~1\PROGRA~1\Updater\resource.rc -o obj\Release\resource.res
windres.exe: warning: 24: 1: 1033: duplicate value

My .manifest file says:

Code: Select all

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
   <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
      <assemblyIdentity
          version="1.0.0.0"
          processorArchitecture="X86"
          name="MyApplication"
          type="win32"/>

     <description>Description of your application</description>

     <!-- Identify the application security requirements. -->
     <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
        <security>
           <requestedPrivileges>
              <requestedExecutionLevel
                   level="asInvoker"
                   uiAccess="false"/>
           </requestedPrivileges>
         </security>
     </trustInfo>
 </assembly>
My manifest.rc file says:

Code: Select all

#include <windows.h>
CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "noadmin.manifest"
And in the resource.rc file I added:

Code: Select all

#include "noadminmanifest.rc"
What might be the reason for the warning?

Thanks,
Thomas
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4193
Joined: Sun Jan 03, 2010 5:45 pm

Re: Including manifest file gives warning

Post by PB »

Wanderer82 wrote: Sat Jul 02, 2022 10:11 pm What might be the reason for the warning?
I think with GCC, the the application manifest is included by default via wx.rc, unless you defined wxUSE_NO_MANIFEST or wxUSE_RC_MANIFEST=0.

Therefore, you may have two resources (manifests) with the same CREATEPROCESS_MANIFEST_RESOURCE_ID ID. Even if they are in different .rc files, they still get compiled into one .res file so the IDs clash.
Wanderer82
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 670
Joined: Tue Jul 26, 2016 2:00 pm

Re: Including manifest file gives warning

Post by Wanderer82 »

Hm okay, and what would I have to change to solve this problem?
Post Reply