[quote=“jules”]
Builds ok here. Are you using an old SDK? XCode 3 and SDK 10.5 is probably the best to go for now.[/quote]
I’m using XCode 3, and have tried both the 10.4 and 10.5 SDKs. Both give the same error. I tried compiling the demo app to compare settings, but the demo won’t compile due to the z_Byte issue mentioned above.
Interestingly, the debug version of my project works, so next I’ll do a comparision of the debug and release settings and see if that sheds some light on the issue.
I found the error in my mac project: I had defined SDKROOT_ppc to be something other than the 10.5 SDK. Removing that build setting fixed my link issues.
I’ve updated the amalgamated file from the SVN and recompiled my application. The result has been the same as it had been before. GDB (MinGW version) showed me where the problem resides. The application throws ‘signal SIGSEGV, Segmentation fault.’ when starts playing.
Here is the detailed desription of the problem:
If I do not call the setAudioDevice member function in my application while initializing then there are no errors at all and everything is going smoothly.
But if I only call setAudioDevice to set device name and sample rate to play at other than the default one while initializing, then when I start playing a TransportSource a segmentation fault is thrown.
that seems a strange place to crash, because it’s obviously getting no input channels. But this morning I have fixed a couple of audio bugs, including one in DSound, so maybe grab the tip and see if it helps.
Julian, please, run your last JUCE Demo program under Windows, open a file to play, start playing and choose another audio device other than a default one (like “Realtek HD Audio output” name). Possiblly, you’ll see the problem I’m talking about, as I’ve been seeing it regularly.
…now, setAudioDevice does not select a new sound device and does not return any errors. No matter what sound device you select, it keeps playing to the same sound card - to the default one…
I compiled Juce (Debug and Release) uncommenting the two
following instructions in the file “juce_Config.h”: #define JUCE_PLUGINHOST_VST 1 #define JUCE_PLUGINHOST_AU 1
On examples “juce demo”, “the jucer” and "example projects"
I uncommented the two following instruction from
the respective files “juce_AppConfig.h”: #define JUCE_PLUGINHOST_VST 1 #define JUCE_PLUGINHOST_AU 1
Now all this examples compiles and run OK.
For the “audio plugins” (VST_Mac version) examples
(the file “juce_AppConfig.h” do not exist for this example),
I make a local copy, on the directory:
"<…>/extras/audio plugins/demo/src/"
of the following files:
“juce_amalgamated.cpp”
“juce_amalgamated.h”
"juce_amalgamated.mm"
then I changed the conde inside “includes.h”: #include "…/…/…/…/juce_amalgamated.h"
to: #define JUCE_PLUGINHOST_VST 1 #define JUCE_PLUGINHOST_AU 1 #include "juce_amalgamated.h"
Then, inside XCode, I changed the reference to file
"juce_amalgamated.mm"
to poit to my local copy.
Now the plugin compile and run OK.
Thanks to fiopa, I can compile Juce.
But I cannot compile Jucedemo.
My Xcode said internal compiler error: Bus error and point juce_amalgmeted.h38475.
…
template
void iterate (EdgeTableIterationCallback& iterationCallback,
const int clipLeft,
int clipTop,
const int clipRight,
int clipBottom,
const int subPixelXOffset) const <- here
{
if (clipTop < top)
clipTop = top;
…
compiler error: Bus error
Please submit a full bug report,
with preprocessed source if appropriate.
See URL:http://developer.apple.com/bugreporter for instructions.
{standard input}:442002:FATAL:.abort detected. Assembly stopping.
from /Users/toshi/Documents/juce/extras/juce demo/build/macosx/…/…/src/juce_LibrarySource.mm:12:
from /Users/toshi/Documents/juce/extras/juce demo/build/macosx/…/…/src/…/…/…/juce_amalgamated.mm:10,
In file included from /Users/toshi/Documents/juce/extras/juce demo/build/macosx/…/…/src/…/…/…/juce_amalgamated.cpp:203894,
/Developer/SDKs/MacOSX10.4u.sdk/Developer/Headers/FlatCarbon/strings.h:1:2: warning: #warning Strings.h is not available on Mac OS X
/Users/toshi/Documents/juce/extras/juce demo/build/macosx/…/…/src/…/…/…/juce_amalgamated.h:38475: internal compiler error: Bus error
Build failed
Hi Toshi…there’s a couple of weird things. Xcode thinks Strings.h(or in reality strings.h) is being included(in Carbon framework and not the std lib), which from the amalgamation file would only be included if BSD or NEED_BSD_STRINGS is defined. Julian has setup search headers to be inside FlatCarbon, so that explains that error(I removed that from the project) and changed #include <Carbon.h> to #include <Carbon/Carbon.h> and #include <Quicktime/Movies.h> in the appropriate errors that follow.
I have the same setup as you, so I downloaded Juce from sourceforge(not the tip)
I modified juce.xcconfig to the following(I don’t have the old 10.3 SDK installed)
[code]
ARCHS = i386 ppc
// These settings let you build for compatibility with 10.3 onwards.
// In XCode 3, this is the best SDK to use…
//SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.5.sdk
// (if you’re building in XCode 2.5, you might need to use this line
// instead of the 10.5 line above…)
SDKROOT = $(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk[/code]
And sure enough I get the exact same errors as you. Which seem to be related to the zlib library but there is a namespace defined around it, so that’s odd. I found the amalgamation file a little resource intensive for my little laptop, but I had compiled it in the past, so to get up and going how about…
I suggest that because you can compile the library(and so can I from the download) you remove juce_AppConfig.h and juce_LibrarySource.mm file from the demo project and add the library file created from the library project.
One last warning, in the library project in juce_Config.h uncomment the #define JUCE_QUICKTIME 1 otherwise you’ll get linker errors in the juce demo.
I just checked out a fresh copy of the source tree and tried building PluginHost. Here’s what I see: 1>------ Build started: Project: PluginHost, Configuration: Debug Win32 ------
1>Compiling...
1>juce_LibrarySource.cpp
1>d:\juce\trunk\juce_amalgamated.cpp(221968) : error C2065: 'Byte' : undeclared identifier
1>d:\juce\trunk\juce_amalgamated.cpp(221968) : error C2059: syntax error : ')'
1>d:\juce\trunk\juce_amalgamated.cpp(226654) : error C2065: 'Bytef' : undeclared identifier
1>d:\juce\trunk\juce_amalgamated.cpp(226654) : error C2059: syntax error : ')'
1>d:\juce\trunk\juce_amalgamated.cpp(226656) : error C2059: syntax error : ')'
Commenting out the #undefs fixes the problem though. I’m just thought I’d mention my experience here.