1

I am trying to use lpsolve for optimisation in MS Visual C++ 2010. However, I have attempted to follow the instructions on linking the libraries but I still get errors when trying to run the demo available on the lpsolve site.

  • I am on a 64-bit system, but I can only make a console 32 application in VS2010
  • I have placed the lpsolve55.dll in both System32 and SysWOW64
  • I have put all the header files in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include
  • I have put all the library files and the dll in C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\lib
  • In the project preferences, linker, additional dependencies I have listed lpsolve55.lib

Using the win32 lpsolve archive, The demo compiles, but then throws the following error as soon as it runs: "Unhandled exception at 0x77b98e19 in lpsolveDEMO.exe: 0xC0000005: Access violation writing location 0x00000014."

I have no experience adding libraries or using any really other than the stdio library. Any help would be greatly appreciated, or any suggestions for more straightforward to use linear optimisation libraries as I can't find any tutorial on lpsolve other than this demo that doesn't work

  • Could it be you are building debug and using release dll's? – cageman Apr 13 '14 at 13:50
  • I don't know sorry, I'm not really sure what I'm doing as I said above. All the headers and libraries and the dll came in the "lp_solve_5.5.2.0_dev_win32.zip" archive listed on the lpsolve site. – Another Newbie Apr 13 '14 at 14:15
  • How would I find out? – Another Newbie Apr 13 '14 at 14:23
  • Do you build release build or debug build in visual studio? Try building release if its debug.. since your are linking to release dll's. You can easily check this in visual studio. – cageman Apr 15 '14 at 16:45

0 Answers0