Wednesday, September 26, 2012

How to make OPNET Modeler 14.5 work in Windows 7 x64

After 2 days of experimenting, the solution is quite simple:
  • Remove all (if present) installations of x86 redistributables/runtime libraries of Visual Studio C++  2008/2010, and restart the computer.
  • Install Visual Studio Professional 2005 (no full installation needed, as long as you install the C++ components) Restart your computer.
  • Make sure that in your PATH environment variable, a path to the bin folder of C++ is present. In my case, it's C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin;
  • Make sure that a LIB environment variable exists, with this path in it:
    C:\Program Files (x86)\Microsoft Visual Studio 8\VC\lib
  • Install OPNET Modeler 14.5. Both x86 and x64 versions will work fine.
  • When you want to run a simulation, press CTRL + R. In the Commons category, choose "Optimized" in the Simulation Kernel. This sets the simulation to run in 32-bit address space.
You don't need to restart your computer every time you change an environment variable's value, but you do have to close and reopen OPNET Modeler.

Removing other redistributables/runtime libraries gets rid of the R6034 error, which is due to problems with manifesting each project's dll file.
Setting the path for the bin folder gets rid of the compilation errors.
Setting the path for the lib folder gets rid of linker/binder errors errors.
Running in 32-bit address space gets rid of the linker errors related to the system's architecture.

There is another way to get rid of the R6034 error. That is by embedding the manifest to the project's dll every time you make changes, by using the mt.exe (C:\Program Files (x86)\Microsoft Visual Studio 8\VC\bin). Could prove useful to people who can't tackle the R6034 issue.

1 comment: