- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I've read through the article describing how to support windows xp when compiling in VS2012. Unfortunately some of the fortran DLLs are now trying to link with MSVCR100.dll, which I dont want because all of our C++ DLLS/EXE in the same application are linking against MSVCR110.DLL.
Without applying the fix to the fortran DLLs, the application runs OK. However, I have a fortran executable (that links with the other fortran DLLs also) which STILL produces the 'not a valid win32 application' error, even with the change to library paths.
Is there a new method of supporting Windows XP in fortran now that VS2012 Update 1 has been released which adds the v110_xp platform toolset, which in our case, all of our VC11 DLLs/EXE compile with?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey Kostrov wrote:
This is Not related to paths to these Fortran DLLs. We recently had a very similar discussion on Intel C++ compiler forum and please take a look:
Forum Topic: Using toolset Visual Studio 2012 - Windows XP (v110_xp) with Intel Compiler
Web-link: software.intel.com/en-us/node/365746
Thanks for pointing this out. I'm not sure there is an equivalent of the _WIN32_WINNT define for fortran though?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Ignore the part about _WIN32_WINNT - it is not relevant to Fortran. I will study this to see how one does this in Fortran.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
No, the define is not applicable because all it does is change the set of definitions from the various SDK .h files. /VERSION is not at all related to this - all that does is insert a version number that you can later display (or fetch). None of this has any bearing on the problem at hand which is linking against MSVC DLLs that use APIs not present in Windows XP.
http://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx is relevant and I will work through this to see what is needed for Fortran, if anything. It looks as if the CRT DLLs were updated in place to support XP SP3, and one just needs to link to the V7.1A SDK and, if building from the command line, set the console subsystem version appropriately.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks once again for your time Steve.
I can also confirm that the /VERSION only injects the 'image version' into the EXE, it does not change the 'operating system version' or the 'subsystem version' values in the header. However, I've changed the Linker:System\SubSystem flag in the project settings to 'Not Set', and then added the linker command line '/SUBSYSTEM:CONSOLE",5.01" and now it DOES work.
So it seems that following the instructions in the article Linking Applications using Visual Studio 2012 to Run on Windows XP caused my DLLs to link against MSVCR100.dll (which I dont need since the DLLs worked fine against MSVCR110.dll anyway), and using the linker command line /SUBSYSTEM has allowed the EXE to run properly on windows XP. Is this maybe a result of the changes made in Update 1 for VS2012?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey Kostrov wrote:
Note: I checked and 'Not Set' in the Subsystem attribute has to be used for 64-bit Windows operating systems.
Setting 'no set' just dropped the /SUBSYSTEM switch from the command line, so maybe if no switch is specified the default is for targetting 64bit? I only did that so my linker switches didnt include /SUBSYSTEM twice.
Cheers.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey Kostrov wrote:
MSDN clearly says that /VERSION controls The version number you want in the header (!!!) of the .exe or .dll file.
Sergey - for clarity - what Steve and nick say about /VERSION is right. That specific number in the executable header has nothing to do with operating system version. You can see the value of that field in the dependency walker screen shot you posted in another thread. This is separate to a version resource and separate to the required operating system/subsystem version (both set by /SUBSYSTEM).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey Kostrov wrote:
>>... Is this maybe a result of the changes made in Update 1 for VS2012?...
Unfortunately, I do not know.
My theory is as follows: Microsoft does whatever it possible to force Loyal to Windows XP users to upgrade the system to some newer Windows operating system and, as everybody knows, such upgrades are not for free...
Realy expected behaviour from Microsoft.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>>Of course it is not relevant directly but it is relevant indirectly. It affects what information will be recorded into an Image Header of a Portable Executable ( PE ) file targeted for some Windows OS.>>>
It is not relevant for the Fortran program itself,but as Sergey said it is relevant for the compuiled into PE format exe file.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page