Code Monkey home page Code Monkey logo

Comments (4)

Svalorzen avatar Svalorzen commented on July 22, 2024

What I usually do in these cases is go inside the FindLpSolve.cmake file (in the cmake/Modules folder) and edit it to add some debugging statements.

You can do this by simply adding some message("my_message ${my_var}") statements inside the various if branches of the script, and at least you can figure out whether CMake is finding the library, if it can use it to compile and so on.

For example, you could put at line 28 something like:

message("Found basic path to lp_lib.h as ${LPSOLVE_INCLUDE_PATH}")

Be sure you have the .lib version of the library as the .a and .so version will not work.

Having to debug CMake is unfortunately annoying, but I have found it is a necessity on Windows given the non-existence of default paths (and also given that the scripts we use to find LpSolve and Eigen are not officially from CMake and I'm not that much of a CMake expert to make them more foolproof).

Let me know if you manage to figure out exactly which step breaks.

from ai-toolbox.

opyr avatar opyr commented on July 22, 2024

Tried a bunch of things, including putting a copy of lpsolve55.dll in System32 and a number of other locations. Finally, I managed to stop the "missing" errors but wound up with "Could not link against lpsolve55!" error. This one is very difficult to troubleshoot, but compiling a test .cpp file came back with an error about linking to dlfcn.h. This file exists in the MinGW/include folder.

Tried installing on OSX machine. The library name is not 'lpsolve55.a' but 'liblpsolve55.a'. Are you aware of that fact? So, on the Apple machine, the error remains as "Missing: LPSOLVE_LIBRARIES".

So I'm unable to build on either platform.

from ai-toolbox.

Svalorzen avatar Svalorzen commented on July 22, 2024

I've never used MinGW to compile the library to be honest, my tests with Windows were always with Visual Studio.

On Mac, and also on Linux, library files are always prefixed with "lib". It's normal, and the build system expects it and automatically adjusts for it. But I think on a Mac the library should have the suffix .dylib, not .a. In issue #35 and #41 two people managed to build the library on Mac, and you can see from their logs that it is the case.

Not sure where they got the library though, as I'm unfamiliar with Macs.

from ai-toolbox.

Svalorzen avatar Svalorzen commented on July 22, 2024

Hi, did you manage to make it work? If you don't need help anymore otherwise I can close this issue.

from ai-toolbox.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.