OPNET module Computer Type "X86" conflicts with Target machine type "X64" Fatal error Lnk1112__net

Source: Internet
Author: User
Tags opnet
OPNET Module Computer type "X86" conflicts with Target machine type "X64" Fatal error LNK1112

In general, compatibility mode can be used, with 32-bit modeler.exe will not be a problem. But to use the 64-bit modeler.exe, and there is the title of the problem, you can refer to this article.

The following is only a record of your own modification process. It is not guaranteed that people who encounter the same problem can solve the problem in the same way. But you can try, it's a big deal to change back again.

Reference article: 1, http://www.docin.com/p-44204938.html

2, the part of fatal Errorlnk 1112 in http://www.p-englmann.de/

3, http://blog.163.com/zhoumhan_0351/blog/static/39954227200982611422889/This is opnet and VC joint debugging


No patience. Please jump directly to the body section.

Preface:

Because you want to move the variable logic of the Opt_int64 type 24 bits to the left, the result is to use printf ("%i64x/n", a), the result of the print is only the lowest 8 digits, the front of the 24-bit surprisingly removed, is obviously a 64bit variable, how can.

Later found to be using the 32bit address space, initially thought to be using the Opnet\14.5.a\sys\ Pc_intel_win32\bin folder under the Modeler.exe, but in the running OPNET\14.5.A\SYS\PC_AMD After the Modeler.exe in _win64\bin\, it was found that the address space of 32bit was still displayed.

In consultation with Niang, found this problem may be related to vs compiler, running CL in cmd, found that decisive is 32-bit compiler. Therefore, the environment variable is changed.

Lib:xxx\microsoft Visual studio10.0\vc\lib\amd64; C:\Program Files (x86) \microsoft Sdks\ Windows\v7.0a\lib\x64;xxx\opnet\14.5.a\sys\pc_amd_win64\lib;

PATH:XXX \microsoft Visual Studio10.0\vc\bin\amd64; G:\ProgramFiles\OPNET\14.5.A\sys\pc_amd_win64 \ Bin;

Anyway find your own installation files under these folders add to the environment variable is good, and then cmd enter set, update environment variables.

In cmd input cl, found to become a 64-bit compiler. As pictured.

(Ps: In the process, also xxx\microsoftvisual the Studio 10.0\vc\vcwizards folder Default.vcxproj, The Win32 in the three folders Defaulttest.vcxproj and vcupgradedefault.vcxproj are all replaced with x64. However, it should be the default platform for projects in VS, and that doesn't matter what this article is about. Just record it anyway. )

Later I didn't know what I had changed, and there was a problem with "FatalError LNK 1112: module computer type ' X86 ' and target machine type ' X64 ' conflict".

Text:

Well, finally to the text. My own hint of the problem should be the BIND_SO_MSVC program error. Check the information on the Internet and according to their own understanding, should be in the link time out of the error. Specific questions as shown:

And at this point in the run Opnet, still is 32-bit address space. So I think it might be opnet the default link program is still used to link 32-bit.

The following modification process, refer to article 1.

Edit->preferences

1, search kernel, modify discreteevent simulation.code generation.compilation compile for 64-bit,development, sequential The kernel entry is true; this should mean that the 64-bit address space is used during the compilation process.

2, search Comp_prog, modify Discreteevent Simulation.code generation.compilation under the C compilation script for Xxx\opnet\14.5.a\sys\ Pc_amd_win64\bin\comp_msvc.exe (please find under your own installation folder). If it is C + +, please change the C + + compilation script.

3, search Bind_static_prog (static linker), modify staticsimulation linking script entry for Xxx\opnet\14.5.a\sys\pc_amd_win64\bin\bind_ Msvc.exe.

4, Search Bind_shobj_prog (dynamic linker), modify networkrepositories linking script entry for Xxx\opnet\14.5.a\sys\pc_amd_win64\bin\bind_so_ Msvc.exe.

5, search bind_static_flags (static linker flag), modify 64-bitstatic simulation flags for/LIBPATH:XXX\OPNET\14.5.A\SYS\PC_AMD_WIN64\LIB/ DEBUG. (/debug preceded by a space)

6, Search bind_shobj_flags (Dynamic linker flag), modify 64-bitnetwork repositories flags entry for/libpath:xxx\opnet\14.5.a\sys\pc_amd_win64\lib /debug.

Summary: Modify the following:

Compile for64-bit, Development, sequential Kernel

Comp_prog

Bind_static_prog/bind_shobj_prog

Bind_static_flags/bind_shobj_flags

At the end of the Configure/run, the simulation is set to development;

The selection in the Kernel type is the item shown in the following figure;

It is best to remove the/WP64 (which I have removed) as shown in the following picture, otherwise the old hint warning (obsessive-compulsive disorder patient cannot. )

In the beginning, it's best to force a compilation, because Opnet seems to have been compiled before no longer compiled. (It's a mistake to save it.) It's best to delete all the previous temp files.

Transferred from http://blog.csdn.net/iamanda/article/details/53484898

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.