I am making my .dll library implemented in OOP manner
my macros are:
#ifndef _SWC_
#define DLLINTERFACE __declspec(dllexport)
#else
#define DLLINTERFACE __declspec(dllimport)
after I put DLLINTERFACE
before a class name using some std
s on it, compiler gives me several warnings that I should provide a dll-interface
for each function that I use with std
s. I try to solve this by putting DLLINTERFACE
on some function but gives me an error now because I already put it on the class name. Perhaps, I can remove the warning by defining all of my public functions with DLLINTERFACE
with it. But how can I eliminate the warnings by defining only the class name, not the individual functions?
like this:
class DLLINTERFACE Foo
{
public:
std::string bar();
};
but not this:
class Foo
{
public:
std::string DLLINTERFACE bar();
};