Unable to get a compiled basic VST detected on Ableton Live and/or Bitwig (Windows)
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
Hi,
I'm working on a VST instrument project. I have already been able to compile it for OSX and get it detected by Ableton Live and/or Bitwig, but not on Windows.
I'm not using Visual Studio for compiling. I'm using Qt. I'm however using the MSVC compiler.
When building it in Windows, I have it detected by VST Plugin Analyser but not by Ableton Live and/or Bitwig.
I'm wondering why VST Analyser does understand it and Ableton Live don't. I'm using VST SDK 2.4.
Maybe someone with more experience could easily tell me how to bypass this issue.
Regards,
Nuno
I'm working on a VST instrument project. I have already been able to compile it for OSX and get it detected by Ableton Live and/or Bitwig, but not on Windows.
I'm not using Visual Studio for compiling. I'm using Qt. I'm however using the MSVC compiler.
When building it in Windows, I have it detected by VST Plugin Analyser but not by Ableton Live and/or Bitwig.
I'm wondering why VST Analyser does understand it and Ableton Live don't. I'm using VST SDK 2.4.
Maybe someone with more experience could easily tell me how to bypass this issue.
Regards,
Nuno
Website http://www.imaginando.pt
-
- KVRer
- 6 posts since 13 Feb, 2015 from Stuttgart, DE
maybe you mixed up building 32bit instead of 64 bit or vice versa? Happens to me all the time...
hollyhook - adaptive music technology
http://hollyhook.de
http://hollyhook.de
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
No, it's not that. I forgot to mention that detail. I'm using 32 bit but I have also tried with 64 bit and no joy.
What can be missing? How can one debug this?
What can be missing? How can one debug this?
Website http://www.imaginando.pt
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
Hi,
I have attached Ableton Live process to VS. This is what I get when I rescan the dll folder:
'Ableton Live 9 Standard.exe' (Win32): Loaded 'C:\tmp\build-vst-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Release\release\audiolab.dll'. Module was built without symbols.
'Ableton Live 9 Standard.exe' (Win32): Unloaded 'C:\tmp\build-vst-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Release\release\audiolab.dll'
No errors! But no plugin listed under plugins also...
I have a .def file with the following contents:
EXPORTS
VSTPluginMain
main=VSTPluginMain
And the following compiler flags:
win32 {
DEFINES += _WINDOWS \
_USRDLL \
_WINDLL \
_CRT_SECURE_NO_DEPRECATE=1
QMAKE_CXXFLAGS += -WX- \
-wd4100 \ # VST SDK is full of un-referenced formal parameters
-Oy- \
-fp:precise \
-Zc:forScope \
-Gd \
-TP
QMAKE_CXXFLAGS_DEBUG += -RTC1 \ # Run time checks
-Od \ # Disable optimization
-GS \ # Buffers security check
-Gm \ # Minimal rebuild
-Zi # Generate complete debugging information
QMAKE_LFLAGS += -INCREMENTAL \
"kernel32.lib" \
"user32.lib" \
"gdi32.lib" \
"winspool.lib" \
"comdlg32.lib" \
"advapi32.lib" \
"shell32.lib" \
"ole32.lib" \
"oleaut32.lib" \
"uuid.lib" \
"odbc32.lib" \
"odbccp32.lib" \
-SUBSYSTEM:WINDOWS \
-TLBID:1 \
-MACHINE:X86 \
-ERRORREPORT:QUEUE
QMAKE_LFLAGS+="/DEF:$$PWD/audiolab.def"
}
And this is the link invoked command:
link /NOLOGO /DYNAMICBASE /NXCOMPAT -INCREMENTAL kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -SUBSYSTEM:WINDOWS -TLBID:1 -MACHINE:X86 -ERRORREPORT:QUEUE /DEF:C:/Users/nsantos/Dropbox/workspace/drc/vst/audiolab.def /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /MANIFEST:embed /OUT:release\audiolab.dll @C:\Users\nsantos\AppData\Local\Temp\audiolab.dll.5508.437.jom
Creating library release\audiolab.lib and object release\audiolab.exp
Any ideas?
Thanks,
Nuno
I have attached Ableton Live process to VS. This is what I get when I rescan the dll folder:
'Ableton Live 9 Standard.exe' (Win32): Loaded 'C:\tmp\build-vst-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Release\release\audiolab.dll'. Module was built without symbols.
'Ableton Live 9 Standard.exe' (Win32): Unloaded 'C:\tmp\build-vst-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Release\release\audiolab.dll'
No errors! But no plugin listed under plugins also...
I have a .def file with the following contents:
EXPORTS
VSTPluginMain
main=VSTPluginMain
And the following compiler flags:
win32 {
DEFINES += _WINDOWS \
_USRDLL \
_WINDLL \
_CRT_SECURE_NO_DEPRECATE=1
QMAKE_CXXFLAGS += -WX- \
-wd4100 \ # VST SDK is full of un-referenced formal parameters
-Oy- \
-fp:precise \
-Zc:forScope \
-Gd \
-TP
QMAKE_CXXFLAGS_DEBUG += -RTC1 \ # Run time checks
-Od \ # Disable optimization
-GS \ # Buffers security check
-Gm \ # Minimal rebuild
-Zi # Generate complete debugging information
QMAKE_LFLAGS += -INCREMENTAL \
"kernel32.lib" \
"user32.lib" \
"gdi32.lib" \
"winspool.lib" \
"comdlg32.lib" \
"advapi32.lib" \
"shell32.lib" \
"ole32.lib" \
"oleaut32.lib" \
"uuid.lib" \
"odbc32.lib" \
"odbccp32.lib" \
-SUBSYSTEM:WINDOWS \
-TLBID:1 \
-MACHINE:X86 \
-ERRORREPORT:QUEUE
QMAKE_LFLAGS+="/DEF:$$PWD/audiolab.def"
}
And this is the link invoked command:
link /NOLOGO /DYNAMICBASE /NXCOMPAT -INCREMENTAL kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -SUBSYSTEM:WINDOWS -TLBID:1 -MACHINE:X86 -ERRORREPORT:QUEUE /DEF:C:/Users/nsantos/Dropbox/workspace/drc/vst/audiolab.def /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /MANIFEST:embed /OUT:release\audiolab.dll @C:\Users\nsantos\AppData\Local\Temp\audiolab.dll.5508.437.jom
Creating library release\audiolab.lib and object release\audiolab.exp
Any ideas?
Thanks,
Nuno
Website http://www.imaginando.pt
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
Here is an image showing the info of the loaded vst by VSTHost:
https://monosnap.com/image/AcVubRvQHCv9 ... oy6hRM86Iu
Why does VSTHost loads the lib and Live doesn't.
What could be the particularity?
https://monosnap.com/image/AcVubRvQHCv9 ... oy6hRM86Iu
Why does VSTHost loads the lib and Live doesn't.
What could be the particularity?
Website http://www.imaginando.pt
-
- KVRian
- 573 posts since 1 Jan, 2013 from Denmark
DId you try debugging and stepping through it?
Set a breakpoint somewhere early in your DLL, depending on your framework. Attach debugger beforehand. Open plugin. Step through code/instructions. What happens?
Set a breakpoint somewhere early in your DLL, depending on your framework. Attach debugger beforehand. Open plugin. Step through code/instructions. What happens?
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
I cannot open the plugin in Ableton Live. That's the problem. It doesn't get listed.
I tried however to start debugger on QtCreator but unfortunately it seems not to be able to attach to Ableton Live (I have always had problems with debugger on QtCreator running on Windows).
Once again. VST Host and VST Analyser accept the plugin and are able to instantiate it. What else can make it invisible to live? Some kind of metadata?
I tried however to start debugger on QtCreator but unfortunately it seems not to be able to attach to Ableton Live (I have always had problems with debugger on QtCreator running on Windows).
Once again. VST Host and VST Analyser accept the plugin and are able to instantiate it. What else can make it invisible to live? Some kind of metadata?
Website http://www.imaginando.pt
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
I have news. I have completed removed any dependency from Qt from the plugin, so basically it's just linking with MSVCR120.dll and Kernel32.dll and it showed up in Live.
What happens if a pluging depends on another .dll? Does it fail to appear even if the necessary dll is present on the current directory?
It is strictly necessary that everything is linked up statically?
What happens if a pluging depends on another .dll? Does it fail to appear even if the necessary dll is present on the current directory?
It is strictly necessary that everything is linked up statically?
Website http://www.imaginando.pt
-
- KVRian
- 573 posts since 1 Jan, 2013 from Denmark
Ah yes, this might generate problems. The problem is, that your working directory is actually your host's, so you need to add your dependencies to the Windows' search list. This can only be done for lazily loaded DLL's (i think the build option is called something like delay-load).sinosoidal wrote:I have news. I have completed removed any dependency from Qt from the plugin, so basically it's just linking with MSVCR120.dll and Kernel32.dll and it showed up in Live.
What happens if a pluging depends on another .dll? Does it fail to appear even if the necessary dll is present on the current directory?
It is strictly necessary that everything is linked up statically?
This was the 'fix' I made for one of my VSTs, I'm sure there's a better way, though.
Code: Select all
#ifdef __WINDOWS__
static bool searchChanged = false;
#endif
/*********************************************************************************************
This is our 'main'
*********************************************************************************************/
#ifdef APE_VST
AudioEffect* createEffectInstance (audioMasterCallback audioMaster)
{
/*
This part is super crucial: Since we are hosted by another application, windows will search
for our dependencies (dll's like scilexer and libtcc) in our host's folder - vstplugins folder
is usually not inside that, so we add another path based off DirectoryPath.
*/
#ifdef __WINDOWS__
if (!searchChanged) {
SetDllDirectory(APE::Misc::DirectoryPath.c_str());
searchChanged = true;
}
#endif
return new APE::Engine(audioMaster);
}
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
Nice! Thanks for sharing your solution.
I'm wondering why it isn't working in my case. For testing purposes I have set the DllDirectory to:
SetDllDirectory(L"C:\tmp\build-vst-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Release\release");
Which is where the plugin is being built to. In the same directory I have QtCore5.dll, icudt53.dll, icuin53.dll, icuuc53.dll which are the basic. Running depends on QtCore5.dll, the only missing dependencies are ones that I never compreend:
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.dll
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.dll
API-MS-WIN-CORE-SHUTDOWN-L1-1-1.dll
API-MS-WIN-CORE-NTUSER-UICONTEXT-EXT-L1-1-1.dll
IESHIMS.dll
The plugin is not listed by Live again.
I'm wondering why it isn't working in my case. For testing purposes I have set the DllDirectory to:
SetDllDirectory(L"C:\tmp\build-vst-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Release\release");
Which is where the plugin is being built to. In the same directory I have QtCore5.dll, icudt53.dll, icuin53.dll, icuuc53.dll which are the basic. Running depends on QtCore5.dll, the only missing dependencies are ones that I never compreend:
API-MS-WIN-CORE-KERNEL32-PRIVATE-L1-1-1.dll
API-MS-WIN-CORE-PRIVATEPROFILE-L1-1-1.dll
API-MS-WIN-CORE-SHUTDOWN-L1-1-1.dll
API-MS-WIN-CORE-NTUSER-UICONTEXT-EXT-L1-1-1.dll
IESHIMS.dll
The plugin is not listed by Live again.
Website http://www.imaginando.pt
-
- KVRian
- 573 posts since 1 Jan, 2013 from Denmark
Did you enable delay-loading? See this topic:
https://msdn.microsoft.com/en-us/library/151kt790.aspx
Otherwise, Windows links your DLL at loading time, before you get a chance to call SetDllDirectory, thus failing the dynamic loading sequence.
https://msdn.microsoft.com/en-us/library/151kt790.aspx
Otherwise, Windows links your DLL at loading time, before you get a chance to call SetDllDirectory, thus failing the dynamic loading sequence.
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
I have added /DELAYLOAD:Qt5Core.dll and this is what I got.
link /NOLOGO /DYNAMICBASE /NXCOMPAT -INCREMENTAL kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -SUBSYSTEM:WINDOWS -TLBID:1 -MACHINE:X86 -ERRORREPORT:QUEUE /DEF:C:/Users/nsantos/Dropbox/workspace/drc/vst/audiolab.def /DELAYLOAD:Qt5Core.dll /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /MANIFEST:embed /OUT:release\audiolab.dll @C:\Users\nsantos\AppData\Local\Temp\audiolab.dll.7300.593.jom
Creating library release\audiolab.lib and object release\audiolab.exp
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
release\audiolab.dll : fatal error LNK1120: 1 unresolved externals
jom: C:\tmp\build-vst-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Release\Makefile.Release [release\audiolab.dll] Error 1120
link /NOLOGO /DYNAMICBASE /NXCOMPAT -INCREMENTAL kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib -SUBSYSTEM:WINDOWS -TLBID:1 -MACHINE:X86 -ERRORREPORT:QUEUE /DEF:C:/Users/nsantos/Dropbox/workspace/drc/vst/audiolab.def /DELAYLOAD:Qt5Core.dll /INCREMENTAL:NO /DLL /SUBSYSTEM:WINDOWS /MANIFEST:embed /OUT:release\audiolab.dll @C:\Users\nsantos\AppData\Local\Temp\audiolab.dll.7300.593.jom
Creating library release\audiolab.lib and object release\audiolab.exp
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
Qt5Core.lib(Qt5Core.dll) : error LNK2001: unresolved external symbol ___delayLoadHelper2@8
release\audiolab.dll : fatal error LNK1120: 1 unresolved externals
jom: C:\tmp\build-vst-Desktop_Qt_5_4_1_MSVC2013_OpenGL_32bit-Release\Makefile.Release [release\audiolab.dll] Error 1120
Website http://www.imaginando.pt
-
- KVRian
- 573 posts since 1 Jan, 2013 from Denmark
Haven't really seen that error before.. Googling seems to suggest the problem can arise from multiple Visual C++ installations, is that the case?
https://msdn.microsoft.com/en-us/library/2b054ds4.aspx
https://msdn.microsoft.com/en-us/library/2b054ds4.aspx
-
- KVRist
- Topic Starter
- 69 posts since 3 Jun, 2011 from Braga, Portugal
Yes, I have Visual Studio Express 2012 and Visual Studio Professional 2013.
http://take.ms/Wb47v
Do you think uninstalling Express will solve this?
http://take.ms/Wb47v
Do you think uninstalling Express will solve this?
Website http://www.imaginando.pt