Topic
  • 5 replies
  • Latest Post - ‏2012-05-06T05:31:36Z by HP31_Longsheng_Sun
rezayas
rezayas
4 Posts

Pinned topic Module machine type 'x64' conflicts with target machine type 'X86'

‏2010-03-02T15:15:50Z |
Hi,

I am trying to run the sample code "blend.cpp" on my computer but I get the following error:
"fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'"

I would like to use VC++ 2008 to use CPLEX; I have Windows 7 on my computer (I suppose it is 64-bit operation system); I installed IBM ILOG CPLEX V12.1 for Windows 64 bit English (CZ3VCEN); and I select the following settings for my project:

Additional Include Directories:
C:\ILOG\Concert29\include;C:\ILOG\CPLEX121\include

Debug Information Format: Disabled

Additional Dependencies:
C:\ILOG\CPLEX121\lib\x64_windows_vs2008\stat_mta\cplex121.lib
C:\ILOG\CPLEX121\lib\x64_windows_vs2008\stat_mta\ilocplex.lib
C:\ILOG\Concert29\lib\x64_windows_vs2008\stat_mta\concert.lib

Any help to resolve this problem is greatly appreciated!

Thanks,
Reza
Updated on 2012-05-06T05:31:36Z at 2012-05-06T05:31:36Z by HP31_Longsheng_Sun
  • Laci Ladanyi
    Laci Ladanyi
    81 Posts

    Re: Module machine type 'x64' conflicts with target machine type 'X86'

    ‏2010-03-02T16:09:52Z  
    The linker error definitely indicates that you have a 32/64-bit mismatch. Your cplex is the 64-bit version, so either your whole Windows 7 is 32-bit version or your VC++ is set up to generate 32-bit objects. My guess is the former.

    --Laci
  • rezayas
    rezayas
    4 Posts

    Re: Module machine type 'x64' conflicts with target machine type 'X86'

    ‏2010-03-02T16:19:18Z  
    The linker error definitely indicates that you have a 32/64-bit mismatch. Your cplex is the 64-bit version, so either your whole Windows 7 is 32-bit version or your VC++ is set up to generate 32-bit objects. My guess is the former.

    --Laci
    Laci, thanks for your reply.

    I check the system information and system type is "64-bit operating system". So I guess my OS is 64-bit?

    But how can I check if the VC++ is set up to generate 32-bit objects?
    In the Project Property window I only have Win32 for Platform; do you think that is the problem? Can I change it somehow?
    Thanks a lot,
    Reza
  • rezayas
    rezayas
    4 Posts

    Re: Module machine type 'x64' conflicts with target machine type 'X86'

    ‏2010-03-03T13:47:31Z  
    I had to change the setting of the VS.NET through Control Panel to make it generate 64-bit objects.
  • y82li
    y82li
    65 Posts

    Re: Module machine type 'x64' conflicts with target machine type 'X86'

    ‏2011-05-23T14:17:57Z  
    • rezayas
    • ‏2010-03-03T13:47:31Z
    I had to change the setting of the VS.NET through Control Panel to make it generate 64-bit objects.
    Hi,Reza,
    I have got same problem. How do you solve this issue. Could you please let me know how do you change the configuration to generate a 64-bit object?

    Thank you!
  • HP31_Longsheng_Sun
    HP31_Longsheng_Sun
    1 Post

    Re: Module machine type 'x64' conflicts with target machine type 'X86'

    ‏2012-05-06T05:31:36Z  
    I also meet this problem about one week ago. As this problem is not answered fully, I think it is great to give an answer to this problem as it took me much time on this and got stuck with my research somehow. If you are using a higher version of visual studio, this is not a problem. However for vs2008, it happens.

    The problem is that you have build a win32 application on a 64 bit system. What you need to do is to change the release to x64.

    1. You need to use your vs2008 installation to install the x64 compilers and tools.

    2.“Build” – “Configuration Manager”, for the active solution platform, click and choose new.

    3.choose x64 in the pop up window.

    Then you can successfully run the program~