Cross-platform means to access server files or mySQL from iPlug2?

Many plugins check a database on-line for registration purposes (to check serial numbers, etc.) and I would like to add that function to my plugins.

I have looked into using mySQL Connector/C++ - and others - but I haven’t found a solution that is straightforward and cross-platform. For example, mySQL Connector/C++ seems to not be self-contained as it requires a DLL to be included with the published APP.

“Sockets” are another means to access webserver files - but again trying to get all this to work cross-platform - and now with ARM64 on Mac - seems quite a challenge.

Is there any particular method most suited for iPlug audio plugins?

I use curl to do http get request from the server.

Thank you. I have tried using curl - adding the necessary header and libraries, etc. - but the minute I add any curl function (such as curl_init()) to my plugin code the plugin stops being recognized by any DAW, i.e., “curl” is somehow corrupting the plugin interface.

I’ve tried calling curl code from the plugin header as well as OnParamChange() with the same result.

So, where are you using curl code? Are you calling it inside the plugin or in an installer app outside the plugin?

I’m calling curl from my license control inside the plugin, when the user enter a serial number and click authorize.

did you add the extra linker flag?

That’s exactly what I want to do. I know this is not an iPlug2 issue but I imagine a lot of folks here would like to know how to implement this in their plugins as well. Did you find an example of how to do this somewhere or did you create your own code from scratch?

Uh - probably not! I’m still trying to figure Curl out.

Is the curl interface completely embedded in the plugin code - or does it require curl DLL(s) and/or curl lib files to be delivered along with the plugin file?

I have my own license control.
Use curl static lib so there are no extra files you need to deliver.
Here is an example of how to use it

1 Like

Awesome! Thank you very much for sharing this!

:+1:

I’ve been working at this for several days and just can’t get it. I have included

#define CURL_STATICLIB 
#include <curl/curl.h>

but “#define CURL_STATICLIB” has no effect and is still producing 2 dll files in addition to my plugin file:

MyPlugin.vst3
libcurl.dll
zlib1.dll

How do I get rid of/embed those curl dll files?

I tried installing the curl static libraries (vcpkg install curl:x64-windows-static) but apparently static packages don’t work in MSVC 2022. Seems that only the dll version works in MSVC 2022. The static version is unrecognized.

Haven’t tried any of this on Mac OS yet. One step at a time.

Any help here greatly appreciated.

You need to build or download a built version of curl static lib (preferably with SSL).
Add the include folder to Additional Include Directories.
Add the lib folder to the linker Additional Library Directories.
Preprocessor Defenitions: CURL_STATICLIB.
Linker Additional Dependencies:
libcurl_a.lib
Ws2_32.lib
Crypt32.lib
Wldap32.lib
Normaliz.lib

Just google how to build and use curl static.
Good luck

1 Like

This is what I was missing! It works now. Thank you!!! :grinning:

I’m using vcpkg in MSVC 2022 and found I only needed to use three of those additional dependencies: Ws-32.lib, Crypt32.lib, and Wldap32.lib plus I had to set the vcpkg Target and Configuration Specific project setting “Use Static Libraries” to “Yes”. (I had already built and installed the static curl vcpkg but couldn’t figure out why it wasn’t working).