- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Am I correct in my understanding that you can compile and link a 64-bit program (to run on a target 64-bit machine/OS) on a 32-bit machine with Core 2 Duo Processor. When I try it the compilation is fine but it stops with the following link error:
Error1 fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'x64\Debug/menuupdate.obj
The name of the object file can vary in the message.
I get the same problem when I tried to rebuild a static library. Why should the linker be called at all?
What is causing the linker to be used?
I am running Visual Studio 2008 with Version 11.0.039 beta Intel FORTRAN for windows.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can add CONFIG=WIN64 under project Properties > Fortran > Preprocessor
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can, but the process of targeting x64 is somewhat convoluted in Visual Studio - so much so that some people try to do it a different way that gets them into trouble.
The correct way is to do Build > Configuration Manager and create a "New" platform of type X64. Make sure that all your projects appear with X64 as the platform type in this dialog. This process is described in the Fortran documentation.
The incorrect way is to go to Tools > Options > Intel Fortran > Compilers and try to change the compiler paths to those for Intel64.
Another way you can run into trouble, especially if you are converting a CVF project, is to have the /machine linker/librarian option set under the Command Line property page. This should be removed.
You must also make sure that you have the "X64 Compiler and Tools" option installed for Visual Studio. This is not the default with a Professional or Team System Edition install.
The librarian is actually the linker wearing a disguise.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, you can, but the process of targeting x64 is somewhat convoluted in Visual Studio - so much so that some people try to do it a different way that gets them into trouble.
The correct way is to do Build > Configuration Manager and create a "New" platform of type X64. Make sure that all your projects appear with X64 as the platform type in this dialog. This process is described in the Fortran documentation.
The incorrect way is to go to Tools > Options > Intel Fortran > Compilers and try to change the compiler paths to those for Intel64.
Another way you can run into trouble, especially if you are converting a CVF project, is to have the /machine linker/librarian option set under the Command Line property page. This should be removed.
You must also make sure that you have the "X64 Compiler and Tools" option installed for Visual Studio. This is not the default with a Professional or Team System Edition install.
The librarian is actually the linker wearing a disguise.
Steve,
I'd already installed X64 Compiler & Tools (I have some C code in the project) and set the platform type in Configuration Manager to x64.
I removed the /machine linker/librarian option and now I get the following message.
Error1 fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'LIBCMTD.lib(chkstk.obj)
- 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
Steve,
The build log is quite a large file. How do you add a file using the Add Files option. It does not seem to work?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Click on Add Files
If you have not previously created a file folder here, fill in a new folder name and click Create Folder
Click on the name of the folder you just created
Click the Browse button to browse for the file, click Upload
Click on the name of the file you uploaded
Optional: edit the Title field
Click Add as Attachment
If the file is very large, feel free to ZIP it first.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve,
I don't see a Browse button on the Add Files dialog box. The only option is to search but this just selects one of the directories that have been created. Each directory has a tick box, what purpose do they serve?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There should be a Browse button to the left of the Upload button. Ignore the tick boxes.
If you're unable to do this, then please open an issue with Intel Premier Support and attach the project files there.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
There should be a Browse button to the left of the Upload button. Ignore the tick boxes.
If you're unable to do this, then please open an issue with Intel Premier Support and attach the project files there.
Steve,
I got a browse button when I double clicked the folder name I'd created. So hopefully there should be a build log file attached which shows the problem I mentioned above.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That worked.
The problem is the following option:
/LIBPATH:"C:Program FilesMicrosoft Visual Studio 9.0VClib"
I don't know where this is coming from - it may be a property set in your project. The correct value would be:
/LIBPATH:"C:Program FilesMicrosoft Visual Studio 9.0VClibamd64"
You should not need to specify this explicitly at all - if you have properly created an "x64" configuration it should be implicit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
That worked.
The problem is the following option:
/LIBPATH:"C:Program FilesMicrosoft Visual Studio 9.0VClib"
I don't know where this is coming from - it may be a property set in your project. The correct value would be:
/LIBPATH:"C:Program FilesMicrosoft Visual Studio 9.0VClibamd64"
You should not need to specify this explicitly at all - if you have properly created an "x64" configuration it should be implicit.
Thanks Steve,
The definition was specified in the Additional Libraries setting for link. I put it in when I was struggling to get the IMSL routines to link last week.
I've now got to the point now where I need to remove all references to F90SQL. CanI use a "Global" 'define' for compiler preprocessor (eg!DEC$ DEFINE CONFIG WIN64) whereby all source files can recognise itand consequentlyI can use the same source for both 32 and 64 bit versions? If not I will have specific copies.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can add CONFIG=WIN64 under project Properties > Fortran > Preprocessor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can add CONFIG=WIN64 under project Properties > Fortran > Preprocessor
That's excellent, thanks again Steve

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