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:


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.


asked 31 Mar '15, 18:30

usa's gravatar image

accept rate: 0%

edited 31 Mar '15, 18:31

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's gravatar image

fbahr ♦
accept rate: 13%

edited 01 Apr '15, 04:17

@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

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's gravatar image

accept rate: 0%

edited 03 Apr '15, 01:50

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • 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



Asked: 31 Mar '15, 18:30

Seen: 2,668 times

Last updated: 03 Apr '15, 01:50

OR-Exchange! Your site for questions, answers, and announcements about operations research.