iPlug2 Forum

Using another lib (POCO) in an iPlug project

Hello! Thanks a lot for this wonderful framework!
I just faced with some troubles. I need to have a simple internet access in a vst3 plug-in (GET, POST, DELETE etc). I found a POCO lib for these purposes and tried to connect. When I use it in a new clear project it works ok. But if I just add some include references to files from POCO to a simple iPlug “MyNewPlugin” based on an iPlugEffect example I have a lot of errors. For example:

E0040	expected an identifier	MyNewPlugin-app	C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\ws2def.h	440	
E0338	more than one instance of overloaded function "__WSAFDIsSet" has 'C' linkage	MyNewPlugin-app	C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\WinSock2.h	141	
C2011	'sockaddr': 'struct' type redefinition	MyNewPlugin-app	C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\shared\ws2def.h	238	

Could you give me some advice where do I have look for solution of that issue? Or may be iPlug has some instruments for that purposes without additional libraries? I can’t use a Windows API because it have to be a crossplatform plug-in.
Thanks in advance

Can you share the MyNewPlugin.h file? Seems like you’ve got your includes wrong, or maybe you put a include inside a namespace?

1 Like

Thank you, bindernews, for the answer! You just have opened my eyes! I placed the POCO includes before iPlug includes and the project was compiled completely.
Thank you again!