-
Hello! Can you advise how to build libosdp for windows? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
I assume you are targeting MSVC; in that case you should be able to compile LibOSDP core without any issues. There are some parts of c-utils that are by design incompatible with Windows but those are not needed to build the library (follow the The python/rust bindings are building LibOSDP for windows natively first before producing the wrappers. You could also consume the library from vcpkg upstream if you are familiar with it. If all of those combinations don’t work for your use case, my suggestion would be to give it a try and post issues you encounter. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the reply! Unfortunately I still can't build libosdp for windows. Maybe there is something I don't understand about how 'configure -> make -> make install' should work on windows. To run the configure script on windows, the power shell suggested me to install wsl, which I did. Running configure under wsl resulted in a config.make. Then there is a dead end. The resulting Makefile with config.make included is assembled in WSL into a .a file that can be used in WSL, but I don't think I can use it to build a Windows application. Installing libosdp with vcpkg was successful. But when I run cmake I get an error like "By not providing "Findlibosdp.cmake" in CMAKE_MODULE_PATH..." it looks like libosdpConfig.cmake or libosdp-config.cmake file is required to use the library. I tried to build a project with libosdp sources. But it still ends up requiring utils/disjoint_set.c to be built, and that requires utils/utils |
Beta Was this translation helpful? Give feedback.
Basically you don't need to build
libutils.a
(the whole library) to build LibOSDP. You can just build the subset of the c-utils project thatsrc/*.c
depends on. This is already how LibOSDP is building c-utils (cmake, make, python and rust). Sorry if that wasn't conveyed correctly.Nevertheless, I made some more fixes now that makes Windows platforms a first class citizen. I also updated the docs to reflect how you can build on Windows from sources and also added a note on how to consume LibOSDP from vcpkg. Let me know if you face any further issues.