-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't build because of lpslove #68
Comments
Did you install lp solve? There's many issues in the repo that you can search that show how you can do it on Windows. |
Yes I did Install lp solve. I did look at the other issues but I could not get it to work. |
Where is it located in your directories? Could you share what is in its folder exactly? |
Its located at C:\Program Files\lpsolve. |
Again, what is in it? What exactly did you download? I also need the entire output of CMake. You might need to delete the entire build folder and start CMake from scratch to get it. |
full command output: C:\AI-Toolbox>mkdir build C:\AI-Toolbox>cmake .. ".." CMake Error: The source directory "C:/" does not appear to contain CMakeLists.txt. C:\AI-Toolbox>cd build C:\AI-Toolbox\build>cmake .. -- Configuring incomplete, errors occurred! |
What compiler are you using? |
I am not sure. I googled it how to find out which one I am using but could not find it. I have visual studio 2022 installed idk if that helps? |
Because the CMake script that is looking to find lp_solve does so by (1) searching for the correct folder and (2) trying to compile a test program, one small test you can try to see what is wrong is to try to compile an example project with lp solve. If you can, then it's just a matter of making CMake here find the folder correctly. If you can't, then there's something wrong with the files and you might have to compile lp solve from source. The docs here might help you on how to do that. |
I created a visual studio project and included the lp_lib.h file and noticed that the file has errors the first one is that it can't find dlfcn.h. Is this normal? Or do I have to install that file from somewhere? |
To be honest, I don't know. I don't think I'm the right person to ask; I don't have much experience with Windows. It is for sure that if you can't compile a simple project with the lp_solve headers, then compiling this one won't be any easier, so I'd work on figuring that out first. As a last remark, in theory, not all of the library depends on lp_solve, and if the parts of AI-Toolbox you want to use don't depend on it you could extract their headers/cpp files and only use those. Unfortunately I have not yet had the time to go and make lp_solve an optional dependency. |
I fixed the errors in the lp_lib.h file and recloned the repo just to try again and for now its not complaining about lp solve but its something with the boost library now. Here is the full about I get when doing cmake .. in the build folder: CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message): This time there are some file being generated CMakeCache.txt is one of them |
That seems to say that Boost Test is missing. You might not have it installed? Certain Boost packages are installed separately because they are not header only (also Boost Python). In any case, if you just set |
I don't think that test folder is what you need. What's inside of it? For the command, my bad, if you only specify no tests it will still build them by default. Try with:
|
When using cmake .. command in the build folder I get the next:
C:\AI-Toolbox\build>cmake ..
-- Selecting Windows SDK version 10.0.22000.0 to target Windows 10.0.19045.
-- Could not link against lpsolve55!
CMake Error at C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find LpSolve (missing: LPSOLVE_LIBRARIES)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.26/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindLpSolve.cmake:91 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:143 (find_package)
-- Configuring incomplete, errors occurred!
Any idea how to fix this?
The text was updated successfully, but these errors were encountered: