# error of calling cplex.dll from C# (4.0) .NET Visual Studio 2013 on win 7.

 0 I am trying to call CPLEX (a mathimatical optimizer) from .NET Visual Studio 2013 on win 7. I have installed optimization.framework. I have added  using Optimization.Solver.Cplex;  in the code. I try to run the example at: http://www-01.ibm.com/support/docview.wss?uid=swg21400073&aid=1  I commented out //using ILOG.Concert; //using ILOG.CPLEX;  It can be built. But, I got error:  Unable to load DLL 'cplex100.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)  I change the DLL to cplex.dll but the same error. In  using Optimization.Solver  when I typed ctrl+space , I can see that it includes many solvers, including CPLEX. Why i got this error. thanks asked 31 Mar '15, 18:30 usa 1●1●2 accept rate: 0%

 1 Your procedure is correct, but the example "LPex1.cs" in provided link (http://www-01.ibm.com/support/docview.wss?uid=swg21400073&aid=1) is not. The correct example is here. There's no such thing as "cplex100.dll". An implementable DLL file for running CPLEX projects should comply with the FORMAT "CPLEX\$.dll" in which the dollar sign stands for your CPLEX version. For example, "CPLEX1260.dll". answered 01 Apr '15, 11:13 monash 37●2●4●11 accept rate: 0%
 4 You need to locate cplex100.dll in your installation and add an appropriate path to your project's linker properties – for your convenience: in detail described here. answered 01 Apr '15, 04:17 fbahr ♦ 4.6k●7●16 accept rate: 13% @fbahr, I have never installed CPLEX100.dll in my machine. When I added "using Optimization.Solver.Cplex;", I thought that the CPLEX100.dll has been embedded in the visual studio. Now, I think I was wrong. I need to install CPLEX100.dll myself. visual studio only provides an interface for CPLEX100.dll, right ? (01 Apr '15, 08:31) usa You need to know where your dll is. Then you need to add it to your references. "Using" only applies to references added to your project. (01 Apr '15, 09:00) JF Meier
 toggle preview community wiki

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "Title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported

Tags: