Question: problems porting a 32-bit application to 64 bit (fortran libraries are 32 bit)

Question: problems porting a 32-bit application to 64 bit (fortran libraries are 32 bit)

First of all, disclaimers: - Background: basic knowledge of computers, I am not a programmer.

  • Previous knowledge of programming, building solutions, etc. -- Very very basic, close to nil. This is my first time building a MVisualStudio solution.

  • Using: Microsoft Visual Studio 2010, working on a Windows 7 machine.


I am a structural engineer trying to recompile and rebuild a program (for seismic analysis of buildings), targeting a 64-bit machine (this will, to my understanding, increase the amount of RAM available to the program and allow me to analyze bigger structures). I seem to have a problem using intel fortran libraries originally written for 32-bit when trying to build a 64-bit application.

The problem:

I have the source code for the application (originally written as a 32-bit application) and I am able to build the solution for a 32-bit machine with no problems. The executable works fine and everything is well. The problem arises when I try to build a 64-bit application.

In Visual Studio 2010, when I go to Project>Properties>configuration Properties>Configuration Manager>Active Solution Platform>, I select "x64", and also "Copy settings from Win32". Then I proceed to build the solution. The building process gives a lot of warnings (but this also happens with the 32-bit build, and I think has to do with the fact that the original application was built using VS2005). The build has a single error:

lnk1112 module machine type x86 conflicts with target machine type x64

From what I researched in the internet, this had to do with the 64-bit solution trying to use libraries compiled for a 32-bit machine. As the application was written originally for 32-bit machines, the libraries it uses are 32-bit. I verified this using dumpbin.exe -headers <*.lib file> for all the *.lib files in the source code. All of them say "x86" on the header.

While for the libraries written specially for the program I have the source code, and I am fairly confident that I can recompile them for 64-bit, there is a number of libraries (Intel Fortran Libraries) that are also provided and used in the original solution, that were written for 32-bit:

IFCONSOL.lib, LIBIFCORE.lib, LIBIFCOREMT.lib, libirc.lib, libm.lib

Evidently, I do not have the source code for these libraries, and thus I would be unable to obtain "64-bit" versions. I have searched in the internet for "ifconsol.lib 64 bit" and the like, etc., but I have not found nothing meaningful (for me, please remember that I am a very inexperienced person).

The question:

My question is: if my solution needs these libraries, how can I obtain equivalent ones for 64-bit? Is there even such a thing as "equivalent 64-bit libraries", or I am talking nonsense....?

I apologize if my question seems silly. Any help or advice would be greatly appreciated!

Thank you!


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

All of the libraries you mention are provided in 64-bit form, and would be referenced automatically. Unfortunately you didn't include the error output that said WHICH library or object had the wrong kind.  My guess is that you are linking to some non-Intel library that has not been recompiled.

But there's one other thing to look for. In the project properties, select Linker > Command Line. Do you see a /MACHINE switch there? If so, remove it and rebuild.

Retired 12/31/2016

Have you tried building a simple Fortran test program for X64? Doing so might reveal problems with your software setup and its suitability for building X64 executables.

The libraries that you listed (ifconsole.lib, etc.) are part of the standard IFort compiler distribution and, if you have installed the X64 compiler correctly, will consist of X64 objects. End users should never need to think about building these libraries from sources.

Firstly, you do not have to be using the Intel compiler on a 64-bit platform in order to build 64-bit executables. You just will not be able to run them on a 32-bit platform.
However, you do need to have the x32 AND the 64-bit versions of the Intel compiler installed on your platform. In order to confirm this, look under C:\Program Files (x86)\Intel\Composer XE 2013 SP1\bin where you should see folders /ia32/ AND intel64 if you have both installed. You will not be able to build 64-bit applications otherwise. Note that on my 64-bit Windows 8 platform, the Intel compiler XE 2013 SP1 is installed into the /Program Files(x86)/ folder and not the /Program Files/ folder, which I think indicates that it is itself a 32-bit application.

So, the first thing you have to do is confirm that you have the compiler version that allows 64-bit builds.
Once you have done this, start a project then open Configuration Manager. Then in the drop-down edit box labelled 'Active solution platform' you will probably see  'Win32' displayed. You need to change this to 'x64'. If that option is not available in the drop-down list, you need to select  <New..> which opens another dialog box which permits you to enter or select 'x64' then select OK. Under project contexts back in Configuration manager, your project configuration will probably be 'Debug' displayed in the drop-down edit box. Under 'Platform', if it does not already show it, select 'x64'.
You should then be in a position to build a 64-bit debug version of your application.

If you need to deploy the application to another computer which does not have EXACTLY the same version of the Visual Studio C++ compiler as the one you have on yours, then you will have to accompany your application with correct libraries from a pack which is downloadable from the Microsoft website. The Intel compiler website provides details of what you will require in that case.


under x64, does building an application with Static linking result in an executable (DLL or EXE) that can be deployed on any other computer without any additional redistributable files, as is the case for win32?



It is my understanding and experience that an application built in the Visual Studio environment will not run correctly on a platform that does not have certain files that are common the the MS VS C++ compiler installed on the target computer. I have had cause to utilise the redistributables found in the Intel-supplied which contains both ia32 and intel64 redistributable installer packs. Clearly, you will have to select the redistributable pack that matches exactly the VS version that you utilise on your own build platform.


David White wrote:


under x64, does building an application with Static linking result in an executable (DLL or EXE) that can be deployed on any other computer without any additional redistributable files, as is the case for win32?



In my experience, yes that's indeed the case.  You can cross-check your files (DLL or EXE) built in such fashion by running them through 64-bit Dependency Walker ( and make sure there are no dependencies on any redistributable files.


In most cases, yes, a statically linked application can be run without further redistributables. Exceptions are if you use OpenMP or coarrays - support for both of those is in DLL form only.

Retired 12/31/2016

Leave a Comment

Please sign in to add a comment. Not a member? Join today