I read through all the links you gave me, but I still don't understand how to use the pimpl_ idiom in a way that would help me with my problem. Could you help me by describing how I could use it for example with this class, which appears in one of my headers:
Code:
#include <webots\MyCpp.hpp>
#include <string>
namespace webots {
class DECLSPEC Device {
public:
virtual ~Device() {}
const std::string getName() const {
return name;
}
bool isValid(void) const {
return (tag!=0);
}
protected:
Device(const std::string &name);
WbDeviceTag getTag() const {
return tag;
}
private:
WbDeviceTag tag;
std::string name;
};
}
The definition of DECLSPEC is as follows, which is taken from MyCpp.hpp:
Code:
// Define DLL macros
#ifdef MYCPPCONTROLLER_EXPORTS
#define DECLSPEC __declspec(dllexport)
#else
#define DECLSPEC __declspec(dllimport)
#endif
Or is there another way that I could overcome the warnings?
Thanks,
Philipp