I’m writing some basic stuff for a VST host.
Question is simple: do u know how if is possible to load a library and get entry point for a function (from a dll in Win32, from a bundle in mac I guess) in a portable manner with JUCE?.
I mean, tried to use the following code (part of VSTSDK2.4 ‘minihost’):
// win 32 load library module=LoadLibrary(fileName); CFStringRef fileNameString = CFStringCreateWithCString (NULL, fileName, kCFStringEncodingUTF8); if(fileNameString==0) return false; CFURLRef url=CFURLCreateWithFileSystemPath(NULL,fileNameString,kCFURLPOSIXPathStyle,false); CFRelease(fileNameString); if(url==0) return false; module=CFBundleCreate(NULL,url); CFRelease(url); if(module && CFBundleLoadExecutable((CFBundleRef)module)==false) return false;
But as soon as I include “windows.h” at top of my cpp file, I get a lot of errors (looks like include windows.h along JUCE is not possible).
A crossplatform library loader would be nice.
Thanks for your time.