Starting up with juce in xCode


#1

Hi!

I’m new to juce. I have limited experience in xCode.

Anyone knows of a hello world tutorial and other slightly more complex tutorials to get started up?

Probable this is a question already answered but I didn’t find any tutorials for xCode 3 anyway.

Thanks in advance


#2

Have a look in extras/example projects/ there is a Xcode hello world project you can fiddle with (better to alter a copy though). For a more complex demo look in extras/juce demo/, this has tons of examples in it.

Have fun!


#3

Thank you so much for your quick reply!

I did snoop around the juce_1_46 zip file. I found 2 xCode projects.

  1. Under extras->example_projects->example_project_for_Mac
  2. Under build->macosx

The one in 1. showed 16 errors when compiled. I just clicked on the project and hit build and go. It said struct MIDIPacket has no member named data 4 times. const struct MIDIPacket has no member named data other 4 times. In the amalgamated.cpp And also:

Line Location MIDIServices.h:371: error: 'z_Byte' does not name a type
Line Location MIDIServices.h:371: error: 'z_Byte' does not name a type
Line Location MIDIServices.h:437: error: expected ';' before '*' token
Line Location MIDIServices.h:437: error: expected ';' before '*' token
Line Location MIDIServices.h:440: error: 'z_Byte' does not name a type
Line Location MIDIServices.h:440: error: 'z_Byte' does not name a type
Line Location MIDIServices.h:2104: error: expected ',' or '...' before '*' token
Line Location MIDIServices.h:2104: error: expected ',' or '...' before '*' token

The one in 2. There was no way to build and go. I get that. I assumed it was because there is no actual project in there yet. But what part of the project in 1. am I supposed to use? 1. seems to be a project in it’s own right.

Also, read the docs about the amalgamated way of doing stuff. It seems a lot easier. Is there a catch to it?


#4

The project under build->macosx is the project to build the Juce library. There is no ‘go’ because there is no executable to launch. The product will be libjuce.a (libjucedebug.a if you build the debug mode) which is a static library which you can link to in your own projects in order to include the Juce classes.

The amalgamated version of Juce is the whole source code in one file. If you include this as one of your sources in a project then you don’t need to build the static library. While this doesn’t make any actual difference to your product some people have noted faster build times when using it but this will depend on the spec of your computer. I personally use the static library as it is easier to debug and find assertions. Sometimes Xcode doesn’t display the very high line numbers associated with the amalgamated version properly.

Are you using Xcode 3.x and building against the 10.5 sdk? (in Xcode Project->Set Active SDK) You are also using an old version of Juce, try grabbing the tip from the repository here: http://sourceforge.net/scm/?type=svn&group_id=137492

Try that and if your still getting the compiler errors have a browse of the forums. A quick search led me to this:
http://www.rawmaterialsoftware.com/juceforum/viewtopic.php?t=3014&postdays=0&postorder=asc&start=45

Hope this helps.


#5

I tried to do a check-out of https://juce.svn.sourceforge.net/svnroot/juce with svnX but I go a problem with the certificate :frowning:
Is that normal? Shouldn’t the certificate be ok?


#6

Hi,

try in Terminal

svn co https://juce.svn.sourceforge.net/svnroot/juce juce.
This should work.


#7

[quote=“kotoko”]I tried to do a check-out of https://juce.svn.sourceforge.net/svnroot/juce with svnX but I go a problem with the certificate :frowning:
Is that normal? Shouldn’t the certificate be ok?[/quote]

Do as peterv says and run the svn co command from Terminal. You will need to accept the certificate “permanently”. Once you have done this once in Terminal it should work fine in svnX.