[Solved] VST2 not detected by Live with SDK 3.6.7

SDK for VST 3 audio plug-in and host development.
bx_joscha
Posts: 55
Joined: Thu Aug 24, 2017 6:21 am

Re: VST2 not detected by Live with SDK 3.6.7

Post by bx_joscha »

So, VSTPluginMain exists, VstPluginMain (as you wrote) does not exist.

Arne Scheffler
Posts: 375
Joined: Mon Jun 20, 2016 7:53 am

Re: VST2 not detected by Live with SDK 3.6.7

Post by Arne Scheffler »

Yeah, it's 'VSTPluginMain'.
This means that the plug-in is correctly exporting the only needed symbol for the host.
The next thing you can check is if your plug-in gets refused by the dynamic linker to load into Live.
Tick the options 'Dynamic Library Loads' in the Xcode scheme editor : Run->Diagnostics.
And set Live as Debug executable and run your plug-in and watch the debugger output for logs generated by the dynamic linker.
Maybe there's something of interest.

blegoff
Posts: 18
Joined: Tue Aug 23, 2016 2:15 pm
Contact:

Re: VST2 not detected by Live with SDK 3.6.7

Post by blegoff »

Arne Scheffler wrote:Yeah, it's 'VSTPluginMain'.
This means that the plug-in is correctly exporting the only needed symbol for the host.
The next thing you can check is if your plug-in gets refused by the dynamic linker to load into Live.
Tick the options 'Dynamic Library Loads' in the Xcode scheme editor : Run->Diagnostics.
And set Live as Debug executable and run your plug-in and watch the debugger output for logs generated by the dynamic linker.
Maybe there's something of interest.
Hi Arne,

What bothers me is that I'm compiling the (only?) VST2 sample project there is in the VST3 SDK.
I'm not trying to use my own code.
Are you sure it's working for you guys ?

Thanks.

Baptiste

bx_joscha
Posts: 55
Joined: Thu Aug 24, 2017 6:21 am

Re: VST2 not detected by Live with SDK 3.6.7

Post by bx_joscha »

Hi Arne,

here is an excerpt of the output given by the logger.

[...]
dyld: loaded: /Users/joscharieber/Library/Audio/Plug-Ins/VST/again.vst/Contents/MacOS/again
dyld: unloaded: /Users/joscharieber/Library/Audio/Plug-Ins/VST/again.vst/Contents/MacOS/again
dyld: loaded: /Users/joscharieber/Library/Audio/Plug-Ins/VST/bx_panEQ.vst/Contents/MacOS/bx_panEQ
dyld: loaded: /Library/Audio/Plug-Ins/VST3/SPAN.vst3/Contents/MacOS/SPAN
dyld: loaded: /Library/Audio/Plug-Ins/VST3/Steinberg/Padshop.vst3/Contents/MacOS/Padshop
[...]

bx_joscha
Posts: 55
Joined: Thu Aug 24, 2017 6:21 am

bx_joscha

Post by bx_joscha »

When I also check "Dynamic Linker API Usage" it gives more info:

[...]
dyld: loaded: /Users/joscharieber/Library/Audio/Plug-Ins/VST/again.vst/Contents/MacOS/again
dyld_image_path_containing_address(0x11710e000)
dyld_image_path_containing_address(0x11710e000)
_dyld_is_memory_immutable(0x11710e000, 28)
_dyld_is_memory_immutable(0x1174eee75, 17)
_dyld_is_memory_immutable(0x1174eefc9, 36)
_dyld_is_memory_immutable(0x1174ef097, 18)
_dyld_is_memory_immutable(0x1174ef0a9, 9)
_dyld_is_memory_immutable(0x1174ef25b, 36)
_dyld_is_memory_immutable(0x1174ef363, 13)
_dyld_is_memory_immutable(0x1174ef370, 11)
_dyld_is_memory_immutable(0x1174ef37b, 14)
_dyld_is_memory_immutable(0x1174ef496, 27)
_dyld_is_memory_immutable(0x1174efcde, 20)
_dyld_is_memory_immutable(0x1174efd04, 18)
_dyld_is_memory_immutable(0x1174efd16, 11)
_dyld_is_memory_immutable(0x1174efd21, 13)
_dyld_is_memory_immutable(0x1174efd3b, 17)
dlopen(/Users/joscharieber/Library/Audio/Plug-Ins/VST/again.vst/Contents/MacOS/again) ==> 0x1013a3711
dlsym(0x1013a3711, SWELL_dllMain)
dlsym(0x1013a3711, SWELL_dllMain) ==> NULL
dlsym(0x1013a3711, VSTPluginMain)
dlsym(0x1013a3711, VSTPluginMain) ==> NULL
dlsym(0x1013a3711, main_macho)
dlsym(0x1013a3711, main_macho) ==> NULL
dlclose(0x1013a3711)
dlclose(), found unused image 0x1013a3710 again
dlclose(), running static terminators for 0x1013a3710 again
dlclose(), deleting 0x1013a3710 again
dyld: unloaded: /Users/joscharieber/Library/Audio/Plug-Ins/VST/again.vst/Contents/MacOS/again
[...]

bx_joscha
Posts: 55
Joined: Thu Aug 24, 2017 6:21 am

Re: VST2 not detected by Live with SDK 3.6.7

Post by bx_joscha »

I fixed the issue. Just add _VSTPluginMain to the file VST_SDK/VST3_SDK/public.sdk/source/main/macexport.exp.

blegoff
Posts: 18
Joined: Tue Aug 23, 2016 2:15 pm
Contact:

Re: VST2 not detected by Live with SDK 3.6.7

Post by blegoff »

bx_joscha wrote:I fixed the issue. Just add _VSTPluginMain to the file VST_SDK/VST3_SDK/public.sdk/source/main/macexport.exp.
Yes, that was it !
Thanks a lot.

Baptiste

ray
Posts: 98
Joined: Fri Sep 02, 2016 9:37 am

Re: [Solved] VST2 not detected by Live with SDK 3.6.7

Post by ray »

This is a little weird though since VSTPluginMain is marked VST_EXPORT in vst2wrapper.cpp which expands to __attribute__ ((visibility ("default"))) under XCode so the VST2 entry point should get exported by default.

Did you try placing something like #error "__GNUC__ undefined" under #define VST_EXPORT in line 3059 in vst2wrapper.cpp to see whether this is the actual source of your problem?

willpirkle
Posts: 67
Joined: Tue Jun 21, 2016 12:53 pm

Re: [Solved] VST2 not detected by Live with SDK 3.6.7

Post by willpirkle »

That's correct - it is already exported. The problem was that they added the exported symbol file to the XCode projects in SDK3.6.7 but they didn't add _VSTPluginMain to it. If you look at previous XCode projects from the previous SDKs (going back to at least 3.6.0), you'll see that although the exported symbols file does exist, it isn't actually used in the included XCode projects.

The reason my project did not have any issues was because it was based on the previous SDK paradigm of not using the exported symbols file at all. When I added it, but without the _VSTPluginMain entry point, then the VST2 didn't show up any more. So, having the exported symbols file (now) included in the XCode project appears to override the existing exports.

One solution to this issue would have been to simply remove the exported symbols file from the XCode project.

BTW: a similar but opposite issue exists on the Windows side. If you look at the SDK 3.6.7 Visual Studio projects, you'll see they've removed the module definition file (exported symbols) for the individual projects.

I did find the new file winexport.def in the ../source/main directory, but I could not find where it was being used in the VS project for the sample code. If I remove it from the SDK, the sample projects still compile correctly and appear in the various DAWs (??!?)

My VS projects have their own .def files like the previous SDKs, including the VSTPluginMain entry point for VST2. Now, I get a compiler warning that VSTPluginMain is being exported twice.

So my new question is how is the GetPluginFactory entry point being exposed for the VST3 plugins in Visual Studio projects? Are there some new files in the 3.6.7 SDK or some place the new winexport.def file is being included?

- Will

ray
Posts: 98
Joined: Fri Sep 02, 2016 9:37 am

Re: [Solved] VST2 not detected by Live with SDK 3.6.7

Post by ray »

willpirkle wrote:That's correct - it is already exported. The problem was that they added the exported symbol file to the XCode projects in SDK3.6.7 but they didn't add _VSTPluginMain to it. If you look at previous XCode projects from the previous SDKs (going back to at least 3.6.0), you'll see that although the exported symbols file does exist, it isn't actually used in the included XCode projects.

The reason my project did not have any issues was because it was based on the previous SDK paradigm of not using the exported symbols file at all. When I added it, but without the _VSTPluginMain entry point, then the VST2 didn't show up any more. So, having the exported symbols file (now) included in the XCode project appears to override the existing exports.

One solution to this issue would have been to simply remove the exported symbols file from the XCode project.

BTW: a similar but opposite issue exists on the Windows side. If you look at the SDK 3.6.7 Visual Studio projects, you'll see they've removed the module definition file (exported symbols) for the individual projects.

I did find the new file winexport.def in the ../source/main directory, but I could not find where it was being used in the VS project for the sample code. If I remove it from the SDK, the sample projects still compile correctly and appear in the various DAWs (??!?)

My VS projects have their own .def files like the previous SDKs, including the VSTPluginMain entry point for VST2. Now, I get a compiler warning that VSTPluginMain is being exported twice.

So my new question is how is the GetPluginFactory entry point being exposed for the VST3 plugins in Visual Studio projects? Are there some new files in the 3.6.7 SDK or some place the new winexport.def file is being included?

- Will
Hi Will,

not adding _VSTPluginMain to the exports is intended/correct I believe, since using the vst2wrapper is optional and the vst2 entry point could not be defined at all when compiling a plugin. In my opinion, they should settle for a consistent way of exporting the relevant symbols on all systems, though, using the __attribute__ or __declspec qualifiers, so there's no confusion as to which exp/def files to use or not to use. I think what we're seeing here is a result of the overal novercal way - no offense, since I'm glad they are still supporting it at all in their latest SDK - vst2 is handeled.

Post Reply