Hi all-- first time posting here, please let me know if I'm doing it wrong.
I've been trying to compile PureVST 0.3 natively for Windows (using Visual Studio 17 2022 for my compiler-- MSVC) and there seems to be a set of macros and headers that the Windows doesn't like (not surprising!). Namely, in pdprocessor.cpp, it doesn't like <dlfcn.h>.
One can patch in a fix using this handy Windows rewrite of dlfcn.hhttps://github.com/dlfcn-win32/dlfcn-win32, though a bunch more linker errors pop up on the build step that involves the Pd source. I compiled the Pd source using the Makefile within MinGW, though since we're using MSVC for PureVST, it seems to have compatibility issues with the includes. Here's a Pastebinhttps://pastebin.com/PxaaUvZX of my Command Prompt.
All in all, I have tried: using MinGW for Pd source and MSVC for PureVST (linker errors when building PureVST), using MSVC for both Pd source and PureVST (fails to compile Pd source), using MinGW for both Pd source and PureVST (fails to compile VST SDK-- though there is thishttps://github.com/perivar/vstsdk, and it seems promising, though I don't know enough CMake to get it working), and using WSL for everything (compiles to a Linux VST, which isn't compatible with Windows DAWs).
I was wondering if any other Windows people have gone through this process and have found a fix. Seems like I've hit a wall here.
Any advice would be greatly appreciated!
Best, Ian Doherty
UIUC CS+Music '25 ied2@illinois.edu
Hi Ian (and welcome to Pd dev list) -
dlfcn is part of the POSIX dynamic loading API that defines dlopen(), etc. Windows has a different API for this, and I haven't yet sat down and adapted pureVST for it. You can see how it's done in the Pd sources themselves, in src/s_loader.c. There are #ifdef _WIN32 lines that separate out the Windows way from the Posix way.
In particular, there's no dlfcn for windows - the API there is probably in windows.h or some such.
Anyhow if you get it working please send your code on to me and I'll throw it in the release for the next time.
thanks Miller
On 4/23/25 1:46 PM, Doherty, Ian wrote:
Hi all-- first time posting here, please let me know if I'm doing it wrong.
I've been trying to compile PureVST 0.3 natively for Windows (using Visual Studio 17 2022 for my compiler-- MSVC) and there seems to be a set of macros and headers that the Windows doesn't like (not surprising!). Namely, in pdprocessor.cpp, it doesn't like <dlfcn.h>.
One can patch in a fix using this handy Windows rewrite of dlfcn.h https://urldefense.com/v3/__https://github.com/dlfcn-win32/dlfcn-win32__;!!Mih3wA!GZwu1ui-wabcJsP5Ew9Wql_B9awbf4Aibl_eTkPFs3ZTAzyBF5ZTRDjmTMmrvs4umHRDrF82TYh_$, though a bunch more linker errors pop up on the build step that involves the Pd source. I compiled the Pd source using the Makefile within MinGW, though since we're using MSVC for PureVST, it seems to have compatibility issues with the includes. Here's a Pastebin https://urldefense.com/v3/__https://pastebin.com/PxaaUvZX__;!!Mih3wA!GZwu1ui-wabcJsP5Ew9Wql_B9awbf4Aibl_eTkPFs3ZTAzyBF5ZTRDjmTMmrvs4umHRDrDadvQme$ of my Command Prompt.
All in all, I have tried: using MinGW for Pd source and MSVC for PureVST (linker errors when building PureVST), using MSVC for both Pd source and PureVST (fails to compile Pd source), using MinGW for both Pd source and PureVST (fails to compile VST SDK-- though there is this https://urldefense.com/v3/__https://github.com/perivar/vstsdk__;!!Mih3wA!GZwu1ui-wabcJsP5Ew9Wql_B9awbf4Aibl_eTkPFs3ZTAzyBF5ZTRDjmTMmrvs4umHRDrCbW0fdd$, and it seems promising, though I don't know enough CMake to get it working), and using WSL for everything (compiles to a Linux VST, which isn't compatible with Windows DAWs).
I was wondering if any other Windows people have gone through this process and have found a fix. Seems like I've hit a wall here.
Any advice would be greatly appreciated!
Best, Ian Doherty
UIUC CS+Music '25 ied2@illinois.edu
pd-dev@lists.iem.at - the Pd developers' mailinglist https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/pd-dev@list...
Hi Ian,
the Windows equivalent to dlopen() resp. dlsym() is LoadLibrary (https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloade...) resp. GetProcAddress (https://learn.microsoft.com/en-us/windows/win32/api/libloaderapi/nf-libloade...).
You might also need to set the DLL directory with SetDllDirectory (https://learn.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-setdl...) so that the library can find its own dependencies.
Christof
On 24.04.2025 14:59, Miller Puckette via Pd-dev wrote:
Hi Ian (and welcome to Pd dev list) -
dlfcn is part of the POSIX dynamic loading API that defines dlopen(), etc. Windows has a different API for this, and I haven't yet sat down and adapted pureVST for it. You can see how it's done in the Pd sources themselves, in src/s_loader.c. There are #ifdef _WIN32 lines that separate out the Windows way from the Posix way.
In particular, there's no dlfcn for windows - the API there is probably in windows.h or some such.
Anyhow if you get it working please send your code on to me and I'll throw it in the release for the next time.
thanks Miller
On 4/23/25 1:46 PM, Doherty, Ian wrote:
Hi all-- first time posting here, please let me know if I'm doing it wrong.
I've been trying to compile PureVST 0.3 natively for Windows (using Visual Studio 17 2022 for my compiler-- MSVC) and there seems to be a set of macros and headers that the Windows doesn't like (not surprising!). Namely, in pdprocessor.cpp, it doesn't like <dlfcn.h>.
One can patch in a fix using this handy Windows rewrite of dlfcn.h https://urldefense.com/v3/__https://github.com/dlfcn-win32/dlfcn-win32__;!!Mih3wA!GZwu1ui-wabcJsP5Ew9Wql_B9awbf4Aibl_eTkPFs3ZTAzyBF5ZTRDjmTMmrvs4umHRDrF82TYh_$, though a bunch more linker errors pop up on the build step that involves the Pd source. I compiled the Pd source using the Makefile within MinGW, though since we're using MSVC for PureVST, it seems to have compatibility issues with the includes. Here's a Pastebin https://urldefense.com/v3/__https://pastebin.com/PxaaUvZX__;!!Mih3wA!GZwu1ui-wabcJsP5Ew9Wql_B9awbf4Aibl_eTkPFs3ZTAzyBF5ZTRDjmTMmrvs4umHRDrDadvQme$ of my Command Prompt.
All in all, I have tried: using MinGW for Pd source and MSVC for PureVST (linker errors when building PureVST), using MSVC for both Pd source and PureVST (fails to compile Pd source), using MinGW for both Pd source and PureVST (fails to compile VST SDK-- though there is this https://urldefense.com/v3/__https://github.com/perivar/vstsdk__;!!Mih3wA!GZwu1ui-wabcJsP5Ew9Wql_B9awbf4Aibl_eTkPFs3ZTAzyBF5ZTRDjmTMmrvs4umHRDrCbW0fdd$, and it seems promising, though I don't know enough CMake to get it working), and using WSL for everything (compiles to a Linux VST, which isn't compatible with Windows DAWs).
I was wondering if any other Windows people have gone through this process and have found a fix. Seems like I've hit a wall here.
Any advice would be greatly appreciated!
Best, Ian Doherty
UIUC CS+Music '25 ied2@illinois.edu
--- pd-dev@lists.iem.at - the Pd developers' mailinglist https://urldefense.com/v3/__https://lists.iem.at/hyperkitty/list/pd-dev@list...
pd-dev@lists.iem.at - the Pd developers' mailinglist https://lists.iem.at/hyperkitty/list/pd-dev@lists.iem.at/message/RNLO3QZ5FLP...