Pelles C forum

C language => Beginner questions => Topic started by: Jean-Pierre Leroy on February 23, 2021, 05:57:46 PM

Title: Win32 console application no longer valid when compile with PellesC Version 10
Post by: Jean-Pierre Leroy on February 23, 2021, 05:57:46 PM
Dear all,

I have a Win32 console application that was compiled with Pelles C 8.0.

Recently I switched to Pelles C version 10.0.

When I run this Win32 console application on an old Windows 2003 R2 server I get this message.

Quote
This application is not a valid Win32 application

The same C source code compile with Pelles C 8.0 runs fine on this old Windows 2003 R2 Server.

Is-there something I can do ?

Thank for your help.
Title: Re: Win32 console application no longer valid when compile with PellesC Version 10
Post by: bitcoin on February 23, 2021, 06:08:10 PM
Change Linker->Os Version and Subsystem to 5.1
or open with any PE editor and change same settings in Optional Header
Title: Re: Win32 console application no longer valid when compile with PellesC Version 10
Post by: Jean-Pierre Leroy on February 23, 2021, 06:56:34 PM
Thank you very much. It works  :)