I'm working on a C++ project which links to a C library. My C++ class is as follows:
extern "C" {
struct __struct1__;
struct __struct2__;
struct __struct3__;
struct __struct4__;
}
namespace mynamespace {
class MyClass : public Parent {
public:
....
private:
....
__struct1__* s1;
__struct2__* s2;
struct __struct3__ s3;
struct __struct4__ s4;
};
}
When creating pointers like s1 and s2, everything is OK. But objects don't work well. The following error is generated:
Error using undefined struct
How can I create objects like s3 and s4?