build that will work on XP

build that will work on XP

Hi,

I remember seeing a sticky on here a few months ago that if using vs2012 and/or the latest intel compiler that extra libraries are needed to get the build to work on windows XP.

now i can't find this thread, and the search tool is very unhelpful since i can't sort the results at all.  (i have always found this forum to be confusing and difficult to use).

help?

thanks,

rob

21 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

Thanks for the info TimP.

However I am having problems getting this to work.

The fortran exe that i build works fine on win7, but when run on XP i get "The specified executable is not a valid application for this OS platform".

In your second link it says that not having VS2012 SP1 can cause errors similar to this, but i have VS2012 11.0.60315.01 Update 2.

The first link looks promising, however i cannot locate the "Platform Toolset" field that is shown in order to select the "Visual Studio 2012 - Windows XP (v110_xp)" option.  For me under Configuration Properties>General all i have is 6 items, not the 8 that is shown.  Is this option hidden somwhere else?

thanks,

rob

Attachments: 

AttachmentSize
Download error.png28.15 KB

You should not need the Platform Toolset option - it isn't available in a Fortran project. Can you run Dependency Walker on the XP system and have it analyze your executable there? It may give you a hint.

Steve

I don't see anything significant in dependency walker.  Just IESHIMS.dll and WER.dll (i've never heard of wer before).

Attached is the dependency walker output in a zip file.

thanks

Attachments: 

AttachmentSize
Download main.zip840.75 KB

Hmm - indeed nothing to see there.Let me think about this some more. Might need to find a way to link to the alternate SDK that Update 2 provides, but I don't know where it gets put.

Steve

I have the same problem and also have VS2012 update 2. I do not have access to the WinXP machine.

Neels

Any ideas?

Will reverting back to update 1 work?

I would expect that to make it worse.  Let me do some experiments and see if I can figure out what's happening.

Steve

Try this.  In Visual Studio. select Tools > Options > Intel Composer XE > Visual Fortran > Compilers. On the Win32 tab, click the ... button to the right of Libraries.  Add the following line at the TOP of the list:

C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib

If you are on a 32-bit system, then remove the " (x86)".

Now rebuild your application. Will it run on XP?

Steve

I am on a 64 bit system, so i did as you said (see attached "setdirlist.png").  After this change I cleaned the solution and did a build.

I get the same result as with the old exe however.  On a win7 machine both work, but If i try to run the exe from explorer on the XP machine i get the same message with the old and the new exe (see attached "error2.png").

Attachments: 

AttachmentSize
Download setdirlist.png10.35 KB
Download error2.png10.72 KB

I suppose I should have asked first - does the folder I named exist?

Steve

yes, i have this directory: C:\Program Files (x86)\Microsoft SDKs\Windows\v7.1A\Lib

Under "Program Files", i only have a v6.0A directory.  So i assumed that i should use "Program Files (x86)".

Quick question if you then copy the exe file back from the XP machine to the win7 machine does it still run? Just a thought that the file has been corrupted in transit.....

Yes, i just tried copying them back to the win7 machine and they work.

Can you try a simple "Hello World" application and see if the same problem occurs?

Steve

My hello world exe exhibits the same behavior.  Runs fine on my win7 machine, but i get "... not a valid win32 application" on the XP machine.

I started a new project and used the stock code plus a read:

! hiworld.f90
!
! FUNCTIONS:
! hiworld - Entry point of console application.
!

!****************************************************************************
!
! PROGRAM: hiworld
!
! PURPOSE: Entry point for the console application.
!
!****************************************************************************

program hiworld

implicit none

! Variables

! Body of hiworld
print *, 'Hello World'
read(*,*)

end program hiworld

Ok, try this - seems to work for me.

Right click on the project and select Properties. 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"

if it is a Windows GUI or QuickWin app, type in:

/SUBSYSTEM:WINDOWS,"5.01"

Steve

That works for me, thanks Steve.

Neels

Works for me too.

Thanks Steve!!!

Ok, great.  This was a tidbit I missed from my initial review of the changes Microsoft made. I have now updated the article.

Steve

Login to leave a comment.