-
Notifications
You must be signed in to change notification settings - Fork 441
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
Unable to build the sdk (C++) in Windows #610
Comments
Hi @hirenpatel1207, can you try to see if this branch helps you build on Windows #608 |
The changes in the PR above were merged into master, so if you use: https://codeload.github.com/ouster-lidar/ouster-sdk/zip/refs/heads/master it should work. |
@matthew-lidar I was able to build the master branch. Thanks. |
Usually what one would do is build the CMake package, then
If you used Visual studio, there's probably also a way to trigger this, but I was unable to find documentation saying specifically how. This will copy the .h .lib and .dll files to a central directory and enable other CMake projects, such as your's to Then do something like the following in your project's CMake and it will automatically find and include those files: project(your_project)
cmake_minimum_required(VERSION 3.10)
find_package(OusterSDK REQUIRED)
add_executable(your_project main.cpp)
target_link_libraries(your_project OusterSDK::ouster_client)
set_property(TARGET your_project PROPERTY CXX_STANDARD 14) |
Do you mean this option in VS? With that option, I was able to generate the header files and ouster_client.lib, ouster_osf.lib, ouster_pcap.lib, and ouster_viz.lib files (see the attached install.zip folder). |
EDIT: |
Yeah, that looks to have done it. Currently the SDK is only built statically, so you will not find any .dlls generated, only .libs. As for the crash, do you have the full stacktrace? |
Got it. My "Hello World" sample program runs now. I had linked wrong .libs from vcpkg. Thanks for the help. |
Sorry for going back and forth on opening this issue as I was not sure on whether to open a new issue or keep this one. |
On Windows you need to make sure you link debug builds of your program with debug builds of the SDK (and release builds with release builds) for things to work correctly generally. I would check to make sure that is occurring. Timeout means that no packets were received in the timeout provided to the |
Yes, I was getting problems with my programs during the release build. Then I had gone back to check if the release version demos work or not. I have tried the demos with no modifications. I had just followed the guide line in the docs to build the package. I had checkout vcpkg 2024.04.26(git checkout 2024.04.26) so that correct libraray versions are linked. |
Describe your question
Building the sdk from source from C++ throws error in compilation.
Screenshots
Platform (please complete the following information):
Goal: Use the C++ sdk to build an application in Windows to capture and store the Lidar data (without using ros2).
I followed the instructions given at https://static.ouster.dev/sdk-docs/cpp/building.html . In the last step it is metioned to open https://github.com/ouster-lidar/ouster-sdk/archive/refs/tags/20240703.zip in Visual studio and build the project. But I am getting errors linkage errors.
Is it possible to get prebuilt binaries for Windows platform?
The text was updated successfully, but these errors were encountered: