Pylon in Qt compilation issues
-
@hodahle said in Pylon in Qt compilation issues:
Microsoft seems to want you to pay in order to get an actual copy of VS2017
Community edition is enough (even build tools would be enough). Did you select C++ support when installing VS2017?
-
@jsulm Yes, I did. This is what I have selected for my VSC2019 installation:
And this is what my compilers page looks like:
Qt complains about the ABI not matching, which is fair enough since it expects the 2017 version, but it doesn't seem to detect it.
-
@jsulm Apologies, I misread your response.
You're right, you can get VSC2017 for free from Microsoft, I just assumed I would have to pay for it because it said I needed a license. My mistake.
I have installed VSC2017 successfully and it now detects the compiler properly, along with not throwing a bunch of syntax errors on compilation. That's good. It compiles successfully if I don't try to include any of the libraries but only link them in the project file. However, if I do, I get a couple of errors.
The debug build produces the following:
:-1: error: LNK1104: cannot open file 'GCBase_MDd_VC141_v3_1_Basler_pylon.lib'
Which is weird, since I specifically link to that library, but whatever, if I switch to release build, I get the following error:
:-1: error: LNK1104: cannot open file 'PylonUtility_MD_VC100.lib'
That one's a little more understandable, since I don't actually link to that library, but that file is not included in the lib folder in the Pylon SDK. I tried googling it, but I couldn't really find anything relevant on it.
-
Update:
This has been a wild goosechase and a half, but I finally got at least the sample projects to run under Visual Studio 2010, which is apparently the version it expects, but I don't know how to get that working with new Qt, since the Visual C++ 2010 compiler can't compile Qt 5.13.
There might be some trickery with using the older build tools with a new compiler or something, but honestly, this is moving pretty firmly outside my current realm of understanding. Any help on how to proceed would be much appreciated.
-
@jsulm You can build it in newer version of Visual Studio as long as you have the old build tools. Seems it is dependent on MSVC2010, which is a disappointment to put it lightly.
Not sure about using it with Qt, though. Would downloading an older version of Qt compatible with MSVC2010 be the best way of going about it? Or should I maybe try to see if I can get some other software working with it instead? QCamera doesn't seem to function with those types of cameras, at least not with the
QCameraInfo::availableCameras()
method, which only recognises my webcam. I'm at a bit of a loss here. -
@hodahle said in Pylon in Qt compilation issues:
Would downloading an older version of Qt compatible with MSVC2010 be the best way of going about it?
If you want to use Pylon and it only supports MSVC2010 then yes.
-
Side note for posterity, but I think I found a way to go about it which works better for me and doesn't involve messing around with MSVC.
For whatever reason, downloading the full Pylon SDK package with the viewer and everything doesn't work very well for me and doesn't let the cameras be recognised as such by my device.
However, if I use only a runtime (I used v5.2, but you could probably use a different one too), it works and gets recognised. QCamera now also recognises the camera, though it fails to set proper viewfinder settings and therefore doesn't work. It also finds 4 cameras instead of just one, which I think is a quirk of the driver or something, since OpenCV does the same thing. I would prefer to do everything with Qt and not be dependent on any external framework, so if there's any pointers on how to set proper viewfinder settings that would be much appreciated, but for now this is fine.
What works and does recognise the camera while reading properly from the camera is OpenCV. In order to be used with MinGW, it has to be made from source with make, but I've managed to make it work on my machine. I followed this guide on the subject, and it worked for me after restarting.
Anyway, I finally have something I can work on again, and I'll consider this question solved. Thanks for the help.
-
@hodahle I have the same issue. My development environment is Qt Version 5.15.0. My application is written in C++ and will be compiled in Qt creator using MinGW/gcc compiler. I installed pylon 6.1.1 Camera Software Suite Windows in developer mode. I want to integrate it with our development environment to see if our application will include the libraries and successfully build and run. I don't have the camera yet but I think that it should be possible to get to this point where the application will successfully build and run with few calls to simple APIs.
I'm stuck. How did you get it working by using Runtime package instead of complete SDK Package (pylon X.x.x Camera Software Suite Windows)? Also can you please provide more information and if possible, can you please attach a screenshot of your .pro file?