Jardo
Jardo

Reputation: 2093

C++ creating a struct from DLL

I'm using a 3rd party DLL which contains a struct. The corresponding header file contains the struct definition like so:

struct MY_STRUCT {
    public:
        MY_STRUCT();

        [members]
}

When I try to create a variable of this type:

MY_STRUCT myStruct;

...I get this error: undefined refference to MY_STRUCT::MY_STRUCT()

I am already linking the DLL to my project since I was using some (dynamically loaded) functions from it before.

Upvotes: 0

Views: 604

Answers (1)

Jardo
Jardo

Reputation: 2093

So I contacted the DLL provider and their answer was: "The DLL doesn't export any structures, you have to implement them yourself". That's just awesome.

Upvotes: 1

Related Questions