New VST model on linux


#1

i built juce and am trying to build my vst on linux, but there is something bad with X11 headers and int64 conversions

g++    -c -g -D__cdecl= -I/home/atom/devel/juce -I../../../src -I../../../../vstsdk2.4 -fPIC  -MMD -MP -MF build/Debug/GNU-Linux-x86/_ext/home/atom/devel/ctrlr/build/linux/ctrlr/../../../wrapper/VST/juce_VST_Wrapper.o.d -o build/Debug/GNU-Linux-x86/_ext/home/atom/devel/ctrlr/build/linux/ctrlr/../../../wrapper/VST/juce_VST_Wrapper.o ../../../wrapper/VST/juce_VST_Wrapper.cpp
../../../wrapper/VST/juce_VST_Wrapper.cpp:361:29: warning: multi-character character constant
In file included from ../../../wrapper/VST/juce_VST_Wrapper.cpp:69:
../../../../vstsdk2.4/public.sdk/source/vst2.x/audioeffectx.cpp: In member function ‘virtual void AudioEffectX::resume()’:
../../../../vstsdk2.4/public.sdk/source/vst2.x/audioeffectx.cpp:307: warning: deprecated conversion from string constant to ‘char*’
../../../wrapper/VST/juce_VST_Wrapper.cpp: At global scope:
../../../wrapper/VST/juce_VST_Wrapper.cpp:137: error: expected constructor, destructor, or type conversion before ‘*’ token
../../../wrapper/VST/juce_VST_Wrapper.cpp: In member function ‘virtual void SharedMessageThread::run()’:
../../../wrapper/VST/juce_VST_Wrapper.cpp:212: error: invalid conversion from ‘void*’ to ‘juce::int64’
../../../wrapper/VST/juce_VST_Wrapper.cpp:219: error: invalid conversion from ‘const juce::int64’ to ‘void*’
../../../wrapper/VST/juce_VST_Wrapper.cpp:219: error:   initializing argument 1 of ‘void juce::MessageManager::setCurrentMessageThread(void*)’
../../../wrapper/VST/juce_VST_Wrapper.cpp: At global scope:
../../../wrapper/VST/juce_VST_Wrapper.cpp:1365: error: ‘Window’ does not name a type
../../../wrapper/VST/juce_VST_Wrapper.cpp: In constructor ‘JuceVSTWrapper::JuceVSTWrapper(VstIntPtr (*)(AEffect*, VstInt32, VstInt32, VstIntPtr, void*, float), juce::AudioProcessor*)’:
../../../wrapper/VST/juce_VST_Wrapper.cpp:350: error: ‘hostWindow’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp: In member function ‘void JuceVSTWrapper::deleteEditor(bool)’:
../../../wrapper/VST/juce_VST_Wrapper.cpp:1155: error: ‘hostWindow’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp: In member function ‘virtual VstIntPtr JuceVSTWrapper::dispatcher(VstInt32, VstInt32, VstIntPtr, void*, float)’:
../../../wrapper/VST/juce_VST_Wrapper.cpp:1198: error: ‘hostWindow’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp:1198: error: ‘Window’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp:1198: error: expected `;' before ‘ptr’
../../../wrapper/VST/juce_VST_Wrapper.cpp:1199: error: expected `;' before ‘editorWnd’
../../../wrapper/VST/juce_VST_Wrapper.cpp:1200: error: ‘display’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp:1200: error: ‘editorWnd’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp:1200: error: ‘XReparentWindow’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp: In member function ‘void JuceVSTWrapper::resizeHostWindow(int, int)’:
../../../wrapper/VST/juce_VST_Wrapper.cpp:1250: error: ‘Window’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp:1250: error: expected `;' before ‘root’
../../../wrapper/VST/juce_VST_Wrapper.cpp:1254: error: ‘display’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp:1254: error: ‘hostWindow’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp:1254: error: ‘root’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp:1255: error: ‘XGetGeometry’ was not declared in this scope
../../../wrapper/VST/juce_VST_Wrapper.cpp:1260: error: ‘XResizeWindow’ was not declared in this scope
make[2]: *** [build/Debug/GNU-Linux-x86/_ext/home/atom/devel/ctrlr/build/linux/ctrlr/../../../wrapper/VST/juce_VST_Wrapper.o] Error 1

#2

Ah, that’s linux VST code, which I don’t think I’ve tried compiling. But at a glance it looks like this might sort it out, in juce_VSTWrapper.cpp:

const Thread::ThreadID originalThreadId = messageManager->getCurrentMessageThread();

?


#3

looks good but i get a segmentation fault when scanning for this plugin, but there might be a lot of things that i did wrong so i’ll sit to it when i get home from work. but the build is ok.


#4

well i was fighting linux the whole day and got nowhere, first i had trouble debugging due to Virtualbox issues (btw. if you want to build something on Ubuntu running on Virtualbox you’ll get gdb errors while debugging, don’t do it, use VMware instead), then i installed VMware but the same problem appeared, when you load a plugin into PluginHost you get a Segmentation Fault (while scanning for new plugins), i tried both my and the demo plugin unchanged from JUCE sources.

maybe someone can verify that the latest juce tip works in terms of VST hosting and plugin wrapper ? perhaps i have some problems with linker/compiler flags.


#5

…I was just in the middle of installing VirtualBox to run Ubuntu! Should I not waste my time, then…?


#6

don’t GDB doesn’t work on VB with ubuntu it took me ober two hours to figure out, there is a reported bug on UBUNTU forums and they say it’s VB fault. install VMware workstation instead it’s free for 30 days and it work, there is always Qemu.