basler / gst-plugin-pylon

The official GStreamer plug-in for Basler cameras
BSD 3-Clause "New" or "Revised" License
40 stars 10 forks source link

Windows build #68

Open snaggas opened 11 months ago

snaggas commented 11 months ago

Hi there,

I tried fairly hard to get the plugin to work on windows but failed, so perhaps someone has some advice.

I believe I followed the instructions correctly, but I haven't managed to get past the meson setup build --prefix=%GSTREAMER_1_0_ROOT_MSVC_X86_64% step without an error. The first time there was an error regarding locating the pylon file. I then tried a more recent version of meson (instead of the suggested meson-0.63.1-64.msi and then the error is "not a valid python or it is missing distutils". From reading online, I thought perhaps it was a python 3.12 issue, but 3.11 gives the same error. Ideas?

Thanks, Sam

rwang5203 commented 10 months ago

Check the versions of your installed packages, it has to be exactly as the instructions, any higher versions will produce an error. Maybe also send the versions of your install packages here to check if everything was installed correctly.

snaggas commented 10 months ago

Thanks for trying to help. I installed:

  1. gstreamer-1.0-msvc-x86_64-1.22.6.msi (latest version of MSVC 64-bit (VS 2019, Release CRT))
  2. gstreamer-1.0-devel-msvc-x86_64-1.22.6.msi (development package)
  3. meson-0.63.1-64.msi
  4. VS Community 2022 version 17.7.6 with Desktop Development with C++
  5. From Visual Studio 2022 Developer Command Prompt v17.7.6, I ran the commands from the instructions, but the meson setup ... command gives the error attached.

The error seems to be to do with VS, perhaps it needs VS 2019 instead...

image

rwang5203 commented 10 months ago

Yeah, I tried VS 2022, also didnt work. I downgraded to VS 2019 like it suggested, and it compiled successfully. Try that and lemme know how it compiles.

thiesmoeller commented 10 months ago

@snaggas Your error message shows that the pkg-config tool can't be found.

This is why you have to set the paths as in the readme.

snaggas commented 10 months ago

Sorry, I see I posted the wrong error. To be clear, I followed the instructions exactly including setting the paths. I tried with both VS 2019 (@rwang5203 this had exactly the same error for me) and VS 2022 and the specified meson version, plus a more recent version.

The error says that pylon is not found. I assume that relates to the set CMAKE_PREFIX_PATH=C:\Program Files\Basler\pylon 7\Development\CMake\pylon\ command, but the folder is there (see attached).

image-2

image-3

snaggas commented 10 months ago

In case it helps somehow, I also noticed in the readme that only pylon 7.3 is officially supported, so I downgraded from 7.4 but the result was the same. I also noticed that when I accidentally used the Windows command line instead of the VS one, the cmake files seem to be found.