Do not define connect() in global space
Brought to you by:
gsaurus
It is not possible to use Pluma and ZeroMQ with its C++ Wrapper in the same project on Windows. The problem is that zmq.hpp includes WinSock2.h which defines its own connect() method in a global space. Due to a surrounding extern "C" statement it is not possible to define another connect method.
As there are probably other projects using WinSock2.h I would suggest to remove the Pluma::connect() function from the global space.
ZeroMQ:
http://www.zeromq.org
zmq.hpp:
https://github.com/zeromq/cppzmq/blob/master/zmq.hpp
WinSock2.h (Not the version included with Windows, but it's good enough to get an idea):
http://www.math.uiuc.edu/~gfrancis/illimath/windows/aszgard_mini/bin/MinGW/include/winsock2.h
The simple solution is to rename the connect function.
At PluginManager.cpp, line 56:
registerFunction = reinterpret_cast<fnRegisterPlugin*>(lib->getSymbol("connectToPlumaHost"));
And on the plugins connectors:
PLUMA_CONNECTOR bool connectToPlumaHost(pluma::Host& host){ ... }