News:

Download Pelles C here: http://www.pellesc.se

Main Menu

Creating resource with manifest

Started by PaoloC13, March 17, 2026, 12:07:33 AM

Previous topic - Next topic

PaoloC13

Start a new project >
 Win64 Program (EXE) | Name: Test >
  Open >
   Filename: main.c >
    Add file to project >
     Filename: main.c >
      Open >
       Build >

[Ouput]
Project build started
Project build ended successfully

File >
 New >
  Resources (Untitled) >
   New >
    Manifest >
     Save >
      Filename: resources >
       Save >

"Do you want to add the file 'resource.rc' to the current project?" >
 Yes

[Ouput]
Document saved: C:\Documents\Test\resources.rc

Build >
 ...Freezed with spinning wheel

Version: 13.00.9
Windows 11


John Z

Hi PaoloC13,

Might need a few more details.  Can you zip the project and post it?

I have created a project with a manifest resource without any problem using v13.

John Z

PaoloC13

I can't replicate the same problem because I uninstalled and reinstalled. It now compiles, but the .exe is broken. I suspect a file encoding issue (or some flag I haven't set?). You cannot view this attachment.

TimoVJL

Just remove comments from xml file
like
    <!-- processorArchitecture="amd64" -->and use this line if it is common to X86 and X64
    processorArchitecture="*"
May the source be with you

John Z

Hi PaoloC13,

Quote from: PaoloC13 on March 18, 2026, 10:48:12 PMI can't replicate the same problem because I uninstalled and reinstalled. It now compiles, but the .exe is broken. I suspect a file encoding issue (or some flag I haven't set?). You cannot view this attachment.

Attached a new version which compiles and runs with a simplified manifest.  If you add to it, do it step by step testing each addition :)

John Z

PaoloC13

#5
Thanks Timo and John,
I've worked on the original version of the manifest automatically generated by version 13.00.9:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">

<assemblyIdentity
    type="win32"
    name="MyOrganization.MyDivision.MyApp"
    version="1.0.0.0"
    <!-- processorArchitecture="amd64" -->
    processorArchitecture="X86"
/>

<description>Verbal description of MyApp.</description>

<dependency>
  <dependentAssembly>
    <assemblyIdentity
        type="win32"
        name="Microsoft.Windows.Common-Controls"
        version="6.0.0.0"
        processorArchitecture="X86"
        publicKeyToken="6595b64144ccf1df"
        language="*"
    />
  </dependentAssembly>
</dependency>

<!--
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <security>
        <requestedPrivileges>
            <requestedExecutionLevel
                level="asInvoker"
                uiAccess="false"
            />
        </requestedPrivileges>
    </security>
</trustInfo>
-->

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
  <application>
     <!-- Application supports Windows 10-->
     <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/>
     <!-- Application supports Windows 8.1 -->
     <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/>
     <!-- Application supports Windows 8 -->
     <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/>
     <!-- Application supports Windows 7 -->
     <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
     <!-- Application supports Windows Vista -->
     <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/>
  </application>
</compatibility>

</assembly>

Proceeding step by step, I've identified three problems, each of which alone causes the .exe to break in my sysem (now I tested also in Windows 10).

1) Line 8 - XML comment inside an opening tag.
   <!-- processorArchitecture="amd64" -->

2) Line 9
   processorArchitecture="X86"

3) Line 20
   processorArchitecture="X86"


Fixes:

1) comment outside <assemblyIdentity ... />

2 & 3) processorArchitecture="*" (processorArchitecture="X64" don't work)

John Z

Great!

What system and OS btw?

John Z

PaoloC13

Intel Celeron N4020 CPU @ 1.10GHz - RAM 4,00 GB
Windows 11 Vers. 23H2

Intel Core i7-7700HQ @ 2.80 GHz - RAM 16,0 GB
Windows 10 Vers. 22H2

TimoVJL

Quote from: PaoloC13 on Today at 11:24:53 AMIntel Celeron N4020 CPU @ 1.10GHz - RAM 4,00 GB
Windows 11 Vers. 23H2

Intel Core i7-7700HQ @ 2.80 GHz - RAM 16,0 GB
Windows 10 Vers. 22H2
Perhaps capable to test Pelles C v14 too.
May the source be with you