- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Hi,
I'm building a Fortran project and get an error "LNK1112: module machine type 'x64' conflicts with target machine type 'X86'" I want to have the project built for 64-bit. I'm using Intel® Parallel Studio XE Composer Edition for Fortran with Rogue Wave IMSL 7.0 for Windows.
I also added paths to includes and libraries as recommended here https://software.intel.com/en-us/articles/installing-and-using-the-imsl-libraries/
In Configuration Manager Active solution platform is x64.
In the Linker->Advanced->Target Machine is "Not Set"
What could cause this error?
Thank you
- Marcas:
- Intel® Fortran Compiler
Link copiado
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Forgot to mention - Visual Studio 2015
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Look at the Linker > Command Prompt property page and see if /machine is specified under "Additional Options". This sometimes happens with projects that were converted from Compaq Visual Fortran (since that option was set there.) If it is there, remove it.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thank you, Steve. Linker > Command Line >Additional Options was empty. "All Options" was empty as well.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Please attach a ZIP file with: your Solution (.sln) and Project (.vfproj) files as well as the buildlog.htm from the failing build. If you are really building an x64 configuration, this would typically be in x64\Debug or x64\Release. When I look at those I may be able to identify the problem.
Do be sure that the "Solutions Platform" dropdown in the VS toolbar says x64 and not Win32. Also double-check Build > Configuration Manager for your x64 Solution Platform to be sure that the Platform for the project is set to x64.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
In earlier versions of MS VS I've noticed in a 64-bit solution that at times if you add a project to a solution that has other projects in 64 bit (main solution toolbar pull-down has x64 selected), the newly added project can come in with only Win32 builds enabled. IOW when opening the Project Build properties, you will not have the x64 configuration listed. This is just one of those quirks that you get used to.
Jim Dempsey
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Steve Lionel (Intel) wrote:
Do be sure that the "Solutions Platform" dropdown in the VS toolbar says x64 and not Win32. Also double-check Build > Configuration Manager for your x64 Solution Platform to be sure that the Platform for the project is set to x64.
Thank you, Steve
I checked the second option Build > Configuration Manager and the solution platform is x64. Also I see the "x64" is a small window on the toolbar, I guess this is the first thing you mention.
I'll ask the permission of the code owner to publish it (the code isn't mine).
I also got advice that I "have to rebuild all of the libraries you link to target x64". Do you think this can help? If yes, what should I do in order to rebuild them?
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
I don't want to see the code, just the project and solution files as well as the buildlog.htm. There's no code in those. No, I don't think that advice will help. The issue is that the project thinks that the executable target platform is x86.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
jimdempseyatthecove wrote:
In earlier versions of MS VS I've noticed in a 64-bit solution that at times if you add a project to a solution that has other projects in 64 bit (main solution toolbar pull-down has x64 selected), the newly added project can come in with only Win32 builds enabled. IOW when opening the Project Build properties, you will not have the x64 configuration listed. This is just one of those quirks that you get used to.
Jim Dempsey
Thank you, Jim
I didn't modify the project in any way. It worked as is on the same system (Studio XE Composer Edition for Fortran with Rogue Wave IMSL 7.0 for Windows + VS 2015) on another desktop. The only difference in OS. The project builds correctly on Win7, but I have Win 8.1
It seems that the settings of the system cause the problem, not the project itself.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Steve Lionel (Intel) wrote:
I don't want to see the code, just the project and solution files as well as the buildlog.htm. There's no code in those. No, I don't think that advice will help. The issue is that the project thinks that the executable target platform is x86.
Please see the files enclosed
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Thanks.
Your X64>Debug configuration has
/MACHINE:I386
in Additional Options for the linker. That's the main issue.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
Steve Lionel (Intel) wrote:
Thanks.
Your X64>Debug configuration has
/MACHINE:I386in Additional Options for the linker. That's the main issue.
Thank you, Steve, this helped.
- Marcar como novo
- Marcador
- Subscrever
- Silenciar
- Subscrever fonte RSS
- Destacar
- Imprimir
- Denunciar conteúdo inapropriado
That was what I asked you to check in my first reply, though. Maybe you didn't look at the configuration that was giving you problems.

- Subscrever fonte RSS
- Marcar tópico como novo
- Marcar tópico como lido
- Flutuar este Tópico para o utilizador atual
- Marcador
- Subscrever
- Página amigável para impressora