Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Not a valid win32 application

Brian_A_
Novice
2,835 Views

After installing the latest IFC on my Windows 7 computer and compiling our code unter the 32bit compiler, the exe will not run on WinXP but will run on Win7.

Version 2013 update 1

When I try to run it in WinXP, it says, "Not a valid win32 application"

Windows 7 works just fine

On anotgher computer running windows 7, I have the IFC version of 12.1.4.325 Build 20120410 and the code compiled on the 32bit compiler on that version works fine on WInXP and Win7.

0 Kudos
30 Replies
Matthew_Z_
Novice
722 Views

I recently updated from Intel Fortran Composer XE 2011 to Fortran Studio XE 2013, and I have SP1 installed. I am building on 64-bit Windows 7. I opened one of the several projects that we have that were for Fortran Composer XE 2011, and I compiled the application. When running the resulting exe on 32-bit Windows XP with Service Pack 3, I get a dialog box that says that the application is not a valid Win32 application. This sounds like the same problem that was being discussed in this thread. However, if the same application is built with the same project file on another developer's machine that is running Fortran Composer XE 2011, the resulting executable runs fine on 32-bit Windows XP with Service Pack 3.

I have premium support. Should I submit a request through that channel, or is it better to work through this problem here, first?

Thanks.

 

0 Kudos
Matthew_Z_
Novice
722 Views

Thank you, Steve.

Most of our applications are console apps, so this portion applies

For Fortran projects, right click on the project and select Properties. Change Configuration to "All Configurations". Go to Linker > System.  Change Subsystem to "Not Set".  Now go to Linker > Command Line. If it is a Console application, type in the Additional Options field:

/SUBSYSTEM:CONSOLE,"5.01"

Because of the heterogeneous development environment we still have amongst several different developers, it concerns me that there is what appears to be a target windows version number in the command-line parameters. I have two questions regarding this:

  1. Will these settings affect the developers that we have who are still using Fortran Composer XE 2011 in VS 2010? Right now, the project and solution files are compatible between XE 2013 and XE 2011 so that they work on both (Personally, I like this and considered it a desireable feature). If I change the project file and other developers use it with XE 2011 on Windows 7, will it work without problems?
  2. Will these settings have an effect on the developers that we have that are still developing on Windows XP with Composer XE 2011?

Thanks.

0 Kudos
Steven_L_Intel1
Employee
722 Views

I don't know the answer to these questions (I am away from the office so can't test these.) The settings are all linker settings and are intended for use with the VS2012 linker. It may be that the older linker in VS2010 won't care about this. Note that this is strictly  VS2012 issue, the Intel Fortran version isn't relevant other than that older versions don't support VS2012.

0 Kudos
Matthew_Z_
Novice
722 Views

I was able to check it myself, and it seems to be ignored in VS2010.

Thanks.

 

0 Kudos
Mohamed_A_
Beginner
722 Views

I just puchased the latest versions Parallel Studio XE 2013 with VS2013 to compile my fortran code on August 15, 2014. I have Windows7 Enterprise.

I compiled and linked the code form a command line in both IA-32 Visual Studio mode, and Intel 64 Visual Studio mode. I also used Visual Studio to Build the executable. All executables did not run and gave the same error: *.exe is not a valid win32 application.

I am not a developer, I am a modeler. I need help with clear directions of what to do.

Thank you in advance

 

0 Kudos
Steven_L_Intel1
Employee
722 Views

If you are running on Windows 7 it is likely not the issue described earlier in this thread. Were there ANY error or warning messages during compile and link? Usually the case here is exceeding Windows' 2GB limit on static code and data - this almost always is hinted at by a linker error about the size of the program being too large.

0 Kudos
Mohamed_A_
Beginner
722 Views

Steve,

I compiled, linked, and produced the executable with no errors. When I tried to run the executable it gave the error: file-name.exe is not a valid Win32 application. I just submitted the issue to Intel(R) Premier Support. Your help is highly appreciated Steve.

Mohamed

0 Kudos
Anthony_Richards
New Contributor I
722 Views

Have you created a x64 program and tried to run it on a 32-bit windows platform? Are you sure that you have created a 32-bit program? If you indeed have, that will run on both 32-bit and 64-bit platforms I think.
Look at the configuration manager and show us a screen shot of what you see.

0 Kudos
Steven_L_Intel1
Employee
722 Views

I'm waiting for Mohamed to provide, through Intel Premier Support, a ZIP of his project including build logs and executable. It would also be instructive to download Dependency Walker and have it analyze the EXE to see what it complains about. I have to assume that Mohamed is using an x64 system, in which case both 32-bit and 64-bit applications would run. My bet is still on too large static data - sometimes the linker doesn't complain if the size is way too big.

0 Kudos
Reply