A
a_unique_name
Guest
Hi Folks:
Developing on VS 2017 Community, Win 10 Pro, all C++, no MFC.
I sometimes use libraries from other sources. I don't remember running into this problem.
I'm trying to link to the Botan crypto library. I'm getting this warning when performing debug builds:
6>d:\utilities\code\windows_files\headers\botan\exceptn.h(22):
warning C4275: non dll-interface class 'std::exception' used as base for dll-interface class 'Botan::Exception'
The exception class in question:
/**
* Base class for all exceptions thrown by the library
*/
class BOTAN_DLL Exception : public std::exception
{
public:
explicit Exception(const std::string& msg) : m_msg(msg) {}
Exception(const char* prefix, const std::string& msg) : m_msg(std::string(prefix) + " " + msg) {}
const char* what() const BOTAN_NOEXCEPT override { return m_msg.c_str(); }
private:
std::string m_msg;
};
I don't want to alter the Botan library's source. I am open to changing parameters to its build script.
What do I need to do on my end, source code or build parameters, to avoid this warning?
Thanks
Larry
Continue reading...
Developing on VS 2017 Community, Win 10 Pro, all C++, no MFC.
I sometimes use libraries from other sources. I don't remember running into this problem.
I'm trying to link to the Botan crypto library. I'm getting this warning when performing debug builds:
6>d:\utilities\code\windows_files\headers\botan\exceptn.h(22):
warning C4275: non dll-interface class 'std::exception' used as base for dll-interface class 'Botan::Exception'
The exception class in question:
/**
* Base class for all exceptions thrown by the library
*/
class BOTAN_DLL Exception : public std::exception
{
public:
explicit Exception(const std::string& msg) : m_msg(msg) {}
Exception(const char* prefix, const std::string& msg) : m_msg(std::string(prefix) + " " + msg) {}
const char* what() const BOTAN_NOEXCEPT override { return m_msg.c_str(); }
private:
std::string m_msg;
};
I don't want to alter the Botan library's source. I am open to changing parameters to its build script.
What do I need to do on my end, source code or build parameters, to avoid this warning?
Thanks
Larry
Continue reading...