Qt MinGW Vimba SDK: definition is marked dllimport

543 views Asked by At

I am using Qt 5.12.2 with MinGW 7.3.0 on Windows 10 x64. I want to use Allied Vision Vimba SDK but get this error message when I want to compile:

C:\Program Files\Allied Vision\Vimba_3.1\VimbaCPP\Include\IFeatureObserver.h:59: Fehler: function 'AVT::VmbAPI::IFeatureObserver::~IFeatureObserver()' definition is marked dllimport
     IMEXPORT virtual ~IFeatureObserver() {}
                      ^

IFeatureObserver.h:

#ifndef AVT_VMBAPI_IFEATUREOBSERVER_H
#define AVT_VMBAPI_IFEATUREOBSERVER_H

#include <VimbaCPP/Include/VimbaCPPCommon.h>
#include <VimbaCPP/Include/SharedPointerDefines.h>
#include <VimbaCPP/Include/Feature.h>
#include <vector>

namespace AVT {
namespace VmbAPI {

class IFeatureObserver 
{
  public:

    IMEXPORT virtual void FeatureChanged( const FeaturePtr &pFeature ) = 0;


    IMEXPORT virtual ~IFeatureObserver() {}

  protected:
    IMEXPORT IFeatureObserver() {}
    IMEXPORT IFeatureObserver( const IFeatureObserver& ) { /* No copy ctor */ }
};
typedef std::vector<IFeatureObserverPtr> IFeatureObserverPtrVector;

}} // namespace AVT::VmbAPI

#endif


This exact same problem was already posted here, but I think I should not open a 6 years old thread. As discribed here https://stackoverflow.com/a/20644594/8010301 this problem seems to be solved already.
But I don't really know what to do.
Like egur said, I have to define the macro AVT_VMBAPI_CPP_EXPORTS in my makefile.

How to define this Macro and where(.pro file of my project or the Makefile inside the Build dir of my Project)? A small guid or an example would be very kind.
I am quite new to c++ and especially developing in Windows. I hope I can find help here.

0

There are 0 answers