-
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
Problem building Lpsolve #32
Comments
Those errors happen because the CMake script in the library is not smart enough to find the folder where you installed On my Windows test system, I have put the If that does not work or you want to keep Let me know if this helps. |
Thank you for you response. My lpsolve folder is actually placed in the same location. I feel maybe the error
has something to do with the shared library that is needed for successful compilation. Can you provide some detail on which library this is and how to use it? |
Ah, it seems you are right. The message
Means that CMake can't find the libraries, and thus can't link Please check that you have |
Yes, I do have the correct files for Windows. |
Yes, unzipping should work. Make sure that the folder is named Another thing you could try to do is to manually edit the |
Thank you. I'll try out your suggestion now. |
Please let me know if you manage to solve this (or if you need more help), and what steps you took. Unfortunately CMake on Windows can be quite fiddly at times, and there's not so much I can do about it... |
Inside the FindLpSolve.cmake file within the AI-Toolbox, I see that the paths are set for a Linux system:
Is there any chance you could share your cmake file for the Windows test system? |
It's the same as what I have. Try to maybe add to the CMake call |
So I've been checking a bit, and there might be multiple problems. I've pushed a new commit, please try again with it. If it still does not work, you may need to look at the An issue I just noticed is that by default Visual Studio selects the 32 bit compiler. You may notice this since at the beginning of the CMake output you'd get something like
Note the |
I looked into this some more and found out that the lpsolve library is in face being located correctly. However, inside the FindLpSolve.cmake file, the code looks for additional libraries:
and this is where it fails to link against lpsolve55. |
Ah, that part I copied from where I originally got the script. The code only goes there if it couldn't link lpsolve alone though, and that should simply just work. Would you mind posting the complete CMake output you get? |
(and possibly the exact command you are calling it with) |
I used the command
And on MacOS:
|
It looks like something is missing.. at the beginning there should be some lines about detecting the CXX compilers. Are you sure they are not there? |
Yes, pretty sure. That's the exact generated output. |
What compiler/toolset are you trying to use in Windows? For example, this is my output in Windows 7 using Visual Studio 2017:
Try to use the |
I'm not sure how to check which compiler is being used. When I run
|
You need to call it like this: Do you have Visual Studio 2017 installed? If not, please download the community edition from here: https://visualstudio.microsoft.com/downloads/ |
Sorry, yes I used |
Please delete the whole The error there it's basically CMake complaining that your new settings conflict with the old ones. |
Thanks for explaining. This is my output now:
|
This line you have tells me that you are trying to compile for 32 bits. I'm not sure whether you passed the If you can't manage to select the 64 bit compiler, another thing you can try to do then would be to download the 32 bit version of the lpsolve libraries, replace the 64 bit version you have now, and try again with those. |
I attempted again with cmake .. -A x64 and I get this output now. Lpsolve seems to link correctly now but there's a problem with boost:
|
Use I installed Boost in On my machine I do have to set |
Everything seems to work ok now other than the boost_python3 library. I don't see why it cannot be located. I installed boost again and placed it in the
|
Alright, here you might have to edit the main On this line is the line where I load the Boost Python library. It seems that on Windows the behavior of the CMake script is slightly different. If you read the warning just above the line, it explains that you might have to rename the Unfortunately, if I just modified the file in the repo, it would break Linux. I could make separate paths for separate platforms, but unfortunately I haven't been able to find out whether this would still work in all cases, so I haven't fixed this yet. |
Voila! That seemed to do the trick. I can finally get started with creating my model now. Thanks a lot for your help! |
No problem! I'll close this issue then :) |
I use Ubuntu and have a similar problem with the LPSOLVE CMake Error at /opt/cmake-3.22.0-linux-x86_64/share/cmake-3.22/Modules/FindPackageHandleStandardArgs.cmake:230 (message): |
How did you install lpsolve? |
Hi , I am using VSCode in windows , after cmake configure, it shows : [main] Configuring folder: AITools-RL Can you help me with that ? Thanks |
Hello,
I recently downloaded this library to use on Windows 10. I have run into trouble building the library though. Firstly, the lpsolve link takes to you to the main website, but doesn't clarify which version of lpsolve to download (https://sourceforge.net/projects/lpsolve/files/lpsolve/5.5.2.5/). I also think this instruction could be made clearer:
Which shared library must I download for this? Are there additional instructions to execute this step?
I am currently getting this error when attempting to build the toolbox:
-- Could not link against lpsolve55!
CMake Error at C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:137 (message):
Could NOT find LpSolve (missing: LPSOLVE_LIBRARIES LPSOLVE_LINKS)
Call Stack (most recent call first):
C:/Program Files/CMake/share/cmake-3.11/Modules/FindPackageHandleStandardArgs.cmake:378 (_FPHSA_FAILURE_MESSAGE)
cmake/Modules/FindLpSolve.cmake:88 (FIND_PACKAGE_HANDLE_STANDARD_ARGS)
CMakeLists.txt:149 (find_package)
Can you tell me which directories LPSOLVE_LIBRARIES and LPSOLVE_LINKS should be pointing to?
Thank you.
The text was updated successfully, but these errors were encountered: