Вы находитесь на странице: 1из 9

Configuring OPNET 12.0 with .

NET 2005 on Windows 64 XP Professional


This document describes my experience with configuring OPNET 12.0 with .NET 2005 compiler on Windows 64-bit XP Professional. The configuration process included: Install .NET 2005 Install OPNET 12.0 Test install

1 Install .NET 2005


I installed Professional edition (includes optimization support in the compiler) using default settings. However, make sure that the 'x64' support is included. I was not prompted for any default settings so there is no "default" compiler. You can verify this afterwards by opening a Command prompt (Start > Run..., type cmd<enter>). In that command prompt, type 'cl' and verify that this fails.

In my case things were mostly installed under C:\Program Files (x86)\Microsoft Visual Studio 8, but some files went into C:\Program Files\Microsoft Visual Studio. After this is installed, you should have a 'Start > Program > Microsoft Visual Studio 2005 menu, with a 'Visual Studio Tools' submenu containing (among other things): 'Visual Studio 2005 Command Prompt' => 32 bit version of the compiler 'Visual Studio 2005 x64 Win64 Command Prompt' => 64 bit version of the compiler

2 Install OPNET 12.0


I installed the following OPNET software: OPNET Software 12.0 PL0 Model Library Documentation

2.1 Tool installation


Install OPNET as usual. This ends up in C:\Program Files (x86)\OPNET\12.0.A by default.

2.2 Manifest Files


OPNET 12.0 ships with the necessary .manifest files for the simulation execution tools, but these are not placed in the bin directories by default because they can only be present IF you are using .NET 2005.

1. Copy the files from <opnet_dir>\12.0.A\sys\pc_intel_win32\bin\manifest into its parent dir (<opnet_dir>\12.0.A\sys\pc_intel_win32\bin).

2. Copy the files from <opnet_dir>\12.0.A\sys\pc_amd_win64\bin\manifest into its parent dir (<opnet_dir>\12.0.A\sys\pc_amd_win64\bin).

2.3 MSVC 8.0 Run time libraries


OPNET is built with MSVC 7.1 (.NET 2003). If you build a repository with .NET 2005, it will reference some of the MSVC 8.0 Runtime libraries. These are NOT included in OPNET 12.0, AND are actually NOT available in your PATH by default. These are provided in the .NET 2005 installation, in some easy to find location 1. Copy the content of C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\x86\Microsoft.VC80.CRT into <opnet_dir>\12.0.A\sys\pc_intel_win32\bin.

2. Copy the content of C:\Program Files (x86)\Microsoft Visual Studio 8\VC\redist\amd64\Microsoft.VC80.CRT into <opnet_dir>\12.0.A\sys\pc_amd_win64\bin.

2.4 OPNET Console


Because Microsoft does not allow two separate compilers to live together, you cant have a single OPNET Console that references both compilers. Instead, just like the x86 and amd64 command prompts provided by .Net 2005, you need to define two separate OPNET Consoles that reference the appropriate version of the compiler. 1. Go to <opnet_dir>\12.0.A\sys\etc. 2. Copy env_vars.bat as env_vars32.bat. 3. Copy env_vars.bat as env_vars64.bat. 4. Edit env_vars32.bat.

5. In the Start menu, go to 'Start > Program > Microsoft Visual Studio 2005 > Visual Studio Tools, right-click on Visual Studio 2005 Command Prompt and select Properties

6. Select the Target: field content and paste it at the end of the env_vars32.bat content:

7. Save and close. 8. Edit env_vars64.bat.

9. Extend the SET command to include <opnet_dir>\12.0.A\sys\pc_amd_win64\bin.

10. In the Start menu, go to 'Start > Program > Microsoft Visual Studio 2005 > Visual Studio Tools, right-click on Visual Studio 2005 x64 Win64 Command Prompt and select Properties. 11. Select the Target: field content and paste it at the end of the env_vars32.bat content:

12. Save and close. 13. Open the Start menu, right-click on the Programs entry and select Explore All Users.

14. Click on the OPNET Modeler 12.0 group to see the various OPNET shortcuts.

15. Rename OPNET Console 12.0 as OPNET Console 12.0-32bit. 16. Copy OPNET Console 12.0-32bit as OPNET Console 12.0-64bit.

17. Right-click on OPNET Console 12.0-32bit and select Properties.

18. In the Target; field, change env_vars.bat to env_vars32.bat.

19. Click OK. 20. Right-click on OPNET Console 12.0-64bit and select Properties. 21. In the Target; field, change env_vars.bat to env_vars64.bat.

22. Click OK. 23. Close the Explorer window.

3 Test Install
1. Select Start > Programs > OPNET Modeler 12.0 > OPNET Console 12.0-32bit. 2. Type cl<enter>.

3. Select Start > Programs > OPNET Modeler 12.0 > OPNET Console 12.0-64bit. 4. Type cl<enter>.

5. If you want to run 32 bit simulations, you need to open an OPNET Console 12.0-32bit and run modeler, op_runsim, or op_mksim from there. If you want to run 64 bit simulations, you do the same but from an OPNET Console 12.0-64bit.

Вам также может понравиться