BrettRD / ros-gst-bridge

a bidirectional ros to gstreamer bridge and utilities for dynamic pipelines
Other
128 stars 30 forks source link

Added Windows build instructions to README #50

Closed genevanmeter closed 2 years ago

genevanmeter commented 2 years ago

Tested with Windows 10 and ROS 2 Humble binary install.

BrettRD commented 2 years ago

Thanks so much for writing this! This would have taken me weeks

I'm getting a linker error looking for a couple of GLib symbols on Windows 10 g_type_*, g_value_*, g_object_* and g_param_*

I have the latest release and devel complete installs of gstreamer, they appear in Path correctly, and basic gst-launch pipelines work from the command line

Do I need to declare another cmake link dependency for GLib? or am I missing a package on my windows box?

(Edit: also, do you happen to know of any ROS2 or GStreamer projects with a Windows CI target I could copy automatic build and test from?)

genevanmeter commented 2 years ago

I was able to recreate the issue. I have vcpkg integrated to my system for other projects which had already built glib. Sorry about that. Although to my defense CMakeCache.txt doesn't contain any references to vcpkg or its associated paths and normally I have to explicitly tell it to use the vcpkg toolchain.

With vcpkg (https://vcpkg.io/en/getting-started.html) vcpkg.exe install glib:x64-windows

Possible issue: vcpkg glib is v2.70.5 vs the gstreamer installers glib v2.62.6.

I will look into making it work without vcpkg. Gstreamer devel installer should have all the necessary components. Added ${GLIB_GOBJECT_LIBRARIES} to target_link_libraries which should resolve the issue.

As for Windows CI targets, I haven't used them.

BrettRD commented 2 years ago

Well spotted with that linker call, this builds on my windows 10 box, and cleans up a loose dependency on Linux targets