Export symbols on Windows dll builds

This commit is contained in:
Matias Fontanini
2016-06-19 09:46:28 -07:00
parent 678ac88c9b
commit 831111812e
14 changed files with 83 additions and 23 deletions

View File

@@ -33,13 +33,14 @@
#include <stdexcept>
#include <string>
#include <librdkafka/rdkafka.h>
#include "macros.h"
namespace cppkafka {
/**
* Base class for all cppkafka exceptions
*/
class Exception : public std::exception {
class CPPKAFKA_API Exception : public std::exception {
public:
Exception(std::string message);
@@ -51,7 +52,7 @@ private:
/**
* A configuration related error
*/
class ConfigException : public Exception {
class CPPKAFKA_API ConfigException : public Exception {
public:
ConfigException(const std::string& config_name, const std::string& error);
};
@@ -59,7 +60,7 @@ public:
/**
* Indicates a configuration option was not set
*/
class ConfigOptionNotFound : public Exception {
class CPPKAFKA_API ConfigOptionNotFound : public Exception {
public:
ConfigOptionNotFound(const std::string& config_name);
};
@@ -67,7 +68,7 @@ public:
/**
* A generic rdkafka handle error
*/
class HandleException : public Exception {
class CPPKAFKA_API HandleException : public Exception {
public:
HandleException(rd_kafka_resp_err_t error_code);