HBadertscher / Matlab_BaslerCamDriver

A universal MATLAB driver for Basler cameras
MIT License
21 stars 5 forks source link

Compilation problem: Boost libraries not found #24

Closed HBadertscher closed 7 years ago

HBadertscher commented 7 years ago

Original post by @ntb13230

Hello,

I've found your files and I'm trying to use them with my Basler acA1920-25um camera. Following the fact that you have developed this for pylon4 that's what I've installed and also I got boost 1.55 After a while of struggling I got to the point where your make.m file finally finds pylon files properly, however i think there is a problem with the boost.

First of all in your make file , in libraries paths, the boost one has addition of 'stage\lib', but there is no such a path in this folder. I tried to change it for 'libs' but this fails as well. Where should this point to?

what i'm getting now while running the make file is this (sorry - very long):

>> make
=> Creating Libraries
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
=> Creating Functions
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
MEX completed successfully.
Building with 'Microsoft Windows SDK 7.1 (C++)'.
Error using mex
baslerGetParameter.cpp
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
: error C2332: 'enum' : missing tag name
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
: error C2236: unexpected 'class' 'ParamType'. Did you forget a ';'?
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
: error C3381: 'ParamType' : assembly access specifiers are only available in code compiled
with a /clr option
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(14)
: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(15)
: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(16)
: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(18)
: error C2143: syntax error : missing ';' before '}'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(18)
: error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(40)
: error C2039: 'Float' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(40)
: error C2065: 'Float' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(41)
: error C2039: 'Int' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(41)
: error C2065: 'Int' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(42)
: error C2039: 'Bool' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(42)
: error C2065: 'Bool' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(43)
: error C2039: 'String' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(43)
: error C2065: 'String' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(86)
: error C2450: switch expression of type 'ParamType' is illegal
        No user-defined-conversion operator available that can perform this conversion, or the
        operator cannot be called
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(88)
: error C2039: 'Float' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(88)
: error C2065: 'Float' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(88)
: error C2051: case expression not constant
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(95)
: error C2039: 'Int' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(95)
: error C2065: 'Int' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(95)
: error C2051: case expression not constant
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(104)
: error C2039: 'Bool' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(104)
: error C2065: 'Bool' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(104)
: error C2051: case expression not constant
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(111)
: error C2039: 'String' : is not a member of 'ParamType'
        C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(13)
        : see declaration of 'ParamType'
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(111)
: error C2065: 'String' : undeclared identifier
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(111)
: error C2051: case expression not constant
C:\Users\ntb13230\Documents\MATLAB\Cameras\HBadertscher-Matlab_BaslerCamDriver-419332a\baslerGetParameter.cpp(124)
: warning C4065: switch statement contains 'default' but no 'case' labels
Error in make (line 64)
            mex(flags{:},ipaths,lpaths,libraryObjects{:},drivers{k})

I don't know if that's something I'm doing wrong or... could you please have a look? (btw - I'm using Matlab 2015a, 64 bit)

Thank you!

HBadertscher commented 7 years ago

Hi @ntb13230

I copied your comment to a new issue, as this is unrelated to the problem the other issue (which is about getting it to run with Pylon 5 instead of Pylon 4).

Getting it to run on Windows 7 seems to be a bit tricky. Luckily, Simon Lansbergen has created a walk-through tutorial which should solve the problem you are having, by installing a pre-compiled Boost library and changing some of my code to be compatible with the Windows SDK 7.1. Can you try to follow these instructions and see if that solves your problem?

PS: sorry that this is a bit tricky.. I wrote this code on a developer machine with self-compiled Boost and a Visual Studio compiler with newer C++ features than SDK 7.1, which is why a few things have to be changed.

ntb13230 commented 7 years ago

Hi!

Thank you very much for so fast reply! There is nothing to apologise - I'm just extremely grateful you wrote these files before, as I would be in big trouble now. I had SDK 7.1 before and indeed the Boost libraries were the problem in my case - getting pre-compiled libraries solved the problem. Everything run smoothly this time! Now you know that your code was verified also for Win 8.1 64-bit with Matlab 2015a :)

Thank you again!!