Hi folks!
I have this error when i try to add a filter to my services.
Everything is running fine without it, but i'm not able to build using the macro NGREST_DECLARE_PLUGIN(::ngrest::JsonFilterGroup) where JsonFilterGroup is my filtergroup
Here is the error:
CMakeFiles/cass_tck_plugin.dir/codegen/ServiceGroupImpl.cpp.o: In function `std::iterator_traits<ngrest::ServiceWrapper* const*>::iterator_category std::__iterator_category<ngrest::ServiceWrapper* const*>(ngrest::ServiceWrapper* const* const&)':
/home/stefano/devel/repo_sport/src/cassandra_tck_cache/cass_tck_plugin/.ngrest/local/build/cass_tck_plugin/codegen/ServiceGroupImpl.cpp:13: multiple definition of `ngrestPlugin'
CMakeFiles/cass_tck_plugin.dir/src/json_filter_group.cpp.o:/home/stefano/devel/repo_sport/src/cassandra_tck_cache/cass_tck_plugin/cass_tck_plugin/src/json_filter_group.cpp:19: first defined here
and here the json_filter_group.cpp file
#include <ngrest/utils/PluginExport.h>
#include "json_filter.h"
#include "json_filter_group.h"
NGREST_DECLARE_PLUGIN(::ngrest::JsonFilterGroup) ;
namespace ngrest {
JsonFilterGroup::JsonFilterGroup():
filters({
{ngrest::Phase::PreSend , {new ::ngrest::JsonFilter()}}
}) {
}
JsonFilterGroup::~JsonFilterGroup() {
for (auto it : filters)
for (ngrest::Filter* filter : it.second)
delete filter;
filters.clear();
}
const std::string& JsonFilterGroup::getName() const {
static const std::string name = "JsonFilterGroup";
return name;
}
const ngrest::FiltersMap& JsonFilterGroup::getFilters() const {
return filters;
}
}
Any suggestion? TIA