VST2.4 and VSTGUI 3.6rc2 under MacOSX10.8 and X-Code 4.6.2

DSP, Plugin and Host development discussion.
RELATED
PRODUCTS

Post

Installed xcode3 and the MacBook totally crashed and now only boot in safe mode...
:shock:

I've an appointement to an Apple store tommorrow, I hope they'll be able to fix it...

You guys did uninstall xcode 4 before installing xcode 3 ??

Post

oh man ! that sux

http://stackoverflow.com/questions/1177 ... ntain-lion

there they say do NOT install IOS SDK from xcode 3

Maybe remove that ?

and

http://hamstergene.github.io/blog/2012- ... tain-lion/

so boot with CMD + S

and

Code: Select all

fsck -fy
mount -uw /
rm -rf /System/Library/Extensions/AppleProfileFamily.kext
rm -rf /System/Library/Extensions/CHUD*.kext

Post

if you can live with xcode4, but using the 10.6 sdk there are some instructions here that might help

http://forum.cockos.com/showpost.php?p= ... tcount=220

Post

thanks ! :)
I'll try that as soon as my MacBook will be running normally again ! :roll:

Post

hibrasil wrote:if you can live with xcode4, but using the 10.6 sdk there are some instructions here that might help

http://forum.cockos.com/showpost.php?p= ... tcount=220
Okay. My Macbook Pro finally got repaired. I figured out how to install SDK 10.6 on Xcode 4.6.2, and I followed the instructions from hibrasil's link above.
After a few semantic errors in VSTGUI, which were corrected by adding static casts, I am now blocked by another kind of error.
Everything seems to build fine until it stops with that message :
ld: library not found for -lc++
clang: error: linker command failed with exit code 1 (use -v to see invocation)
any idea ?? which setting should I enable to have the "-v" equivalent effect and see invocation (I guess this should help find the origin of that error...) ?
:help: (again) !

Post

nobody ?
:?

Post

Okay I actually solved this by choosing the LLVM GCC 4.2 compiler instead of the default Apple LLVM Compiler...
don't ask me why. :roll:
more errors are coming now... I'll keep this topic updated.

Post

After one more day losing my hairs and my mental sanity :bang: , here is a little update.

I think (at least I hope) that all the OS X 10.6 SDK problem seems now to be ok.

I've used a small app called Pacifist to extract only the files I needed from the Xcode3 installer, and then I followed the procedure described here.

But now I've problems apparently related to cpu architecture.

When I configure the builder to build only to 32 bit (ARCHS = i386 and VALID_ARCHS=i386), I get 58 linker errors, all looking somewhat like these :
Undefined symbols for architecture i386:
"__Unwind_Resume_or_Rethrow", referenced from:
AEffGUIEditor::AEffGUIEditor(void*)in aeffguieditor.o
AEffGUIEditor::AEffGUIEditor(void*)in aeffguieditor.o
VSTGUI::CDataBrowser::CDataBrowser(VSTGUI::CRect const&, VSTGUI::CFrame*, VSTGUI::IDataBrowser*, long, long, VSTGUI::CBitmap*)in cdatabrowser.o
VSTGUI::CDataBrowser::beginTextEdit(long, long, char const*)in cdatabrowser.o
VSTGUI::CDataBrowser::recalculateLayout(bool) in cdatabrowser.o
VSTGUI::CDataBrowser::~CDataBrowser()in cdatabrowser.o
VSTGUI::CDataBrowser::~CDataBrowser()in cdatabrowser.o
...
"std::_List_node_base::hook(std::_List_node_base*)", referenced from:
VSTGUI::CNewFileSelector::addFileExtension(VSTGUI::CFileExtension const&)in cfileselector.o
VSTGUI::CNewFileSelector::setDefaultExtension(VSTGUI::CFileExtension const&)in cfileselector.o
VSTGUI::COptionMenu::addEntry(VSTGUI::CMenuItem*, long)in vstcontrols.o
"std::_List_node_base::unhook()", referenced from:
VSTGUI::COptionMenu::removeEntry(long) in vstcontrols.o
"std::__throw_bad_alloc()", referenced from:
std::vector<char*, std::allocator<char*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<char**, std::vector<char*, std::allocator<char*> > >, char* const&)in cocoasupport.o
"std::__throw_length_error(char const*)", referenced from:
std::vector<char*, std::allocator<char*> >::_M_insert_aux(__gnu_cxx::__normal_iterator<char**, std::vector<char*, std::allocator<char*> > >, char* const&)in cocoasupport.o
"std::terminate()", referenced from:
VSTGUI::CDataBrowser::CDataBrowser(VSTGUI::CRect const&, VSTGUI::CFrame*, VSTGUI::IDataBrowser*, long, long, VSTGUI::CBitmap*)in cdatabrowser.o
VSTGUI::CDataBrowser::~CDataBrowser()in cdatabrowser.o
VSTGUI::CDataBrowser::~CDataBrowser()in cdatabrowser.o
VSTGUI::CDataBrowser::~CDataBrowser()in cdatabrowser.o
CocoaFileSelector::~CocoaFileSelector()in cocoasupport.o
CocoaFileSelector::~CocoaFileSelector()in cocoasupport.o
CocoaFileSelector::~CocoaFileSelector()in cocoasupport.o
...
If I set the builder to build for 64 bit (ARCHS=x86_64 and VALID_ARCHS=x86_64), I only have 1 error, in aeffguieditor.cpp :
aeffguieditor.cpp:296: Cannot convert 'const mach_header_64*' to 'const mach_header*' in initialization
and obviously this error is due to the fact that aeffguieditor.cpp is developed for 32 bit, right ?

I'm still a few days away to give up with the Mac platform and release my VST only for Windows, but I also think I shouldn't be that far away from succeeding...
Anyone has some more hints or idea on what I'm maybe still doing wrong or what I should investigate / modify VSTGUI SDK / adapt build parameters / etc... ??

Thanks in advance !

Post

Hi FBO,

I know that this thread is a bit old, but I am wondering whether you got any further and succeeded in the end. I am currently struggling with very similar issues. In the end I want to port my pg-8x to MAC, but currently I cant even get the tutorial files compiled...

Any help, or links to threads which have more clues would be greatly appreciated.

Cheers,
Martin

Post

Hi Martin,

Yes, I succeeded in the end, but it was a very rough road.

I've been a PC developer for more than 15 years, programming in C++, but also on industrial platforms with CEI-61131-3 languages.
The conclusion of this case was for me to realize that the community of MAC developers is a very closed community, selfish and whose skills are mainly based on the mastery of the X-Code development environment, which is quite just like Apple's general policy: closed,inflexible, and with commercial objectives. :roll:

But in the end, I managed to find a friend of a friend who succeeded in configuring the X-Code compiler in the right way (with the same "try-random-parameters" I already used before, but he knew a little more than me about some obscure functions and the differences between apple compilers).
I had only few adjustments to do in my source code.

As I borrowed a MacBook to a friend to make this Mac version, I'll have to borrow it again to give you all the exact parameters used in the compiler. But your first challenge is to install the OSX 10.6 SDK on your x-code environment. follow the link I gave in my last post, and I'll pray for you. :pray:
One you succeeded on that part, I'll try to give you more informations asap.

Good luck !

Post

Thanks!

I got the sdk-10.6 installed (from Xcode 4.1). It also seems to find all header files and my project files (well, the tutorial project, that is) and compiles them.

The problems appear at link stage: I get a long list (89 issues) of stuff like:

Code: Select all

 Undefined symbols for architecture i386:
  "createNSView(VSTGUI::CFrame*, VSTGUI::CRect const&)", referenced from:
      VSTGUI::CFrame::initFrame(void*) in vstgui.o
  "resizeNSView(void*, VSTGUI::CRect const&)", referenced from:
      VSTGUI::CFrame::setSize(long, long) in vstgui.o
  "destroyNSView(void*)", referenced from:
      VSTGUI::CFrame::~CFrame() in vstgui.o
  "addNSTextField(VSTGUI::CFrame*, VSTGUI::CTextEdit*)", referenced from:
      VSTGUI::CTextEdit::takeFocus() in vstcontrols.o
  "getSizeOfNSView(void*, VSTGUI::CRect*)", referenced from:
      VSTGUI::CFrame::getSize(VSTGUI::CRect*) const in vstgui.o
  "moveNSTextField(void*, VSTGUI::CTextEdit*)", referenced from:
      VSTGUI::CTextEdit::parentSizeChanged() in vstcontrols.o
      VSTGUI::CTextEdit::setViewSize(VSTGUI::CRect&, bool) in vstcontrols.o
  "nsViewScrollRect(void*, VSTGUI::CRect const&, VSTGUI::CPoint const&)", referenced from:
      VSTGUI::CFrame::scrollRect(VSTGUI::CRect const&, VSTGUI::CPoint const&) in vstgui.o
...
I suppose that I have not yet included any graphics framework (Cocoa,etc.) in my project. Any idea what I will have to do next?

Thanks,
Martin

Post

martin_l wrote:Thanks!

I got the sdk-10.6 installed (from Xcode 4.1). It also seems to find all header files and my project files (well, the tutorial project, that is) and compiles them.

The problems appear at link stage: I get a long list (89 issues) of stuff like:

Code: Select all

 Undefined symbols for architecture i386:
  "createNSView(VSTGUI::CFrame*, VSTGUI::CRect const&)", referenced from:
      VSTGUI::CFrame::initFrame(void*) in vstgui.o
  "resizeNSView(void*, VSTGUI::CRect const&)", referenced from:
      VSTGUI::CFrame::setSize(long, long) in vstgui.o
  "destroyNSView(void*)", referenced from:
      VSTGUI::CFrame::~CFrame() in vstgui.o
  "addNSTextField(VSTGUI::CFrame*, VSTGUI::CTextEdit*)", referenced from:
      VSTGUI::CTextEdit::takeFocus() in vstcontrols.o
  "getSizeOfNSView(void*, VSTGUI::CRect*)", referenced from:
      VSTGUI::CFrame::getSize(VSTGUI::CRect*) const in vstgui.o
  "moveNSTextField(void*, VSTGUI::CTextEdit*)", referenced from:
      VSTGUI::CTextEdit::parentSizeChanged() in vstcontrols.o
      VSTGUI::CTextEdit::setViewSize(VSTGUI::CRect&, bool) in vstcontrols.o
  "nsViewScrollRect(void*, VSTGUI::CRect const&, VSTGUI::CPoint const&)", referenced from:
      VSTGUI::CFrame::scrollRect(VSTGUI::CRect const&, VSTGUI::CPoint const&) in vstgui.o
...
I suppose that I have not yet included any graphics framework (Cocoa,etc.) in my project. Any idea what I will have to do next?

Thanks,
Martin
I'm in this horror as well, however i think i'm a couple of steps ahead of you.

Those names seem to be from cocoasupport.mm (ie. the objective-c part of vstgui), either check that file is added in the project and that xcode is set to compile objective-c files as well (that would be the 'compile files as source type' option, or similar).
The conclusion of this case was for me to realize that the community of MAC developers is a very closed community, selfish and whose skills are mainly based on the mastery of the X-Code development environment, which is quite just like Apple's general policy: closed,inflexible, and with commercial objectives. :roll:
This has been my experience as well, however a select few are willing to help :)

Post

Thanks very much for your help.

Adding the cocoasupport.mm to the project did get me a bit further.

I guess my main problem is a lack of understanding of the whole Xcode world. Are there any good tutorials our there?

Currently, my problems seems to be that it does not find the AudioEffect routines when linking:

Code: Select all

Undefined symbols for architecture i386:
  "AudioEffect::int2string(int, char*, int)", referenced from:
      vtable for TutorialVST2Effect in TutorialVST2Effect.o
  "AudioEffect::masterIdle()", referenced from:
      vtable for TutorialVST2Effect in TutorialVST2Effect.o
  "AudioEffect::float2string(float, char*, int)", referenced from:
      vtable for TutorialVST2Effect in TutorialVST2Effect.o
  "AudioEffect::setInitialDelay(int)", referenced from:
      vtable for TutorialVST2Effect in TutorialVST2Effect.o
 ...
They are part of my project, though. Apart from adding them to the project, is there anything else I need to do to make Xcode compile and link against them?

Thanks,
Martin

Post

you need to make sure the .cpp files that contain the methods that cant be found are included in the target that you are building. Check the "Compile Sources" build phase for the target to see if the file that contains these methods is in there.

ps. have you considered using IPlug or JUCE? they both have project generators that massively simplify this kind of thing, plus you can target formats other than VST2.

Post

Hi Hibrasil,
hibrasil wrote:you need to make sure the .cpp files that contain the methods that cant be found are included in the target that you are building. Check the "Compile Sources" build phase for the target to see if the file that contains these methods is in there.
I think I get it compiled and linked now. Now the big questions is: where do I find the result of all this??? I guess I am really not used to Xcode and feel pretty lost.

hibrasil wrote:ps. have you considered using IPlug or JUCE? they both have project generators that massively simplify this kind of thing, plus you can target formats other than VST2.
To be honest, I have not investigated too much. I saw JUCE, but did not want to use it due to it's license. I did not want to go open source, but also did not want to pay the fee for the commercial license.

I am currently looking at IPlug, but I am not sure whether I should try to port my existing code into the IPlug framework. I have to see how much effort that would be, as compared to the direct MAC port.


Thanks,
Martin

Post Reply

Return to “DSP and Plugin Development”