Linker error in Xcode in debug mode

Hey All,

I am getting the following error when I try to run an app in the Debug configuration:

ZeroLink: unknown symbol '__ZThn8_N4juce15JUCEApplication22actionListenerCallbackERKNS_6StringE
(myAppName) has exited due to signal 6 (SIGABRT).

I copied the juce helloworld project’s settings over to my project, but for the life of me I can’t figure out what is different between the two. It compiles and runs fine in Release mode… it is just Debug that is giving me trouble…

BTW, is the macro DBG supposed to put out stuff to the console in Release mode? In Windows, as advertised, DBG only works in the Debug configuration.

thanks,

c.

Looks to me like your code’s crashing. Surely the debugger will show you where it’s going wrong?

That’s right - the DBG macro doesn’t get compiled in release mode, but you can call Logger::writeDebugString if you want to.

The debugger just shows assembly, and it crashes on a call I don’t recognize, something to do with:
<_dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0+951>

if that means anything to you.

It is strange though, because the Release version runs fine.

As for DBG, the reason I mentioned it is because it IS putting out text in the Release version of the executable, and I thought that wasn’t supposed to happen.

I forgot to mention that I am using Xcode 2.4

thanks,

c.

Yeah, it crashes in assembly of course, but where’s it being called from?

It crashes before my initialise() method in my subclass of JUCEApplication.

Here is the stack in the debugger:

#0 0x9003d66c in kill
#1 0x9010e8cf in raise
#2 0x9010d422 in abort
#3 0x9617f49c in undefinedHandler
#4 0x8fe0f27e in _dyld__ZN16ImageLoaderMachO16resolveUndefinedERKN11ImageLoader11LinkContextEPK11macho_nlistbPPS0
#5 0x8fe11256 in __dyld__ZN16ImageLoaderMachO25doBindExternalRelocationsERKN11ImageLoader11LinkContextEb
#6 0x8fe11502 in __dyld__ZN16ImageLoaderMachO6doBindERKN11ImageLoader11LinkContextENS0_15BindingLazinessE
#7 0x8fe0a38a in __dyld__ZN11ImageLoader13recursiveBindERKNS_11LinkContextENS_15BindingLazinessE
#8 0x8fe0caee in __dyld__ZN11ImageLoader4linkERKNS_11LinkContextENS_15BindingLazinessENS_18InitializerRunningEj
#9 0x8fe03982 in __dyld__ZN4dyld4linkEP11ImageLoaderNS0_15BindingLazinessENS0_18InitializerRunningE
#10 0x8fe08721 in __dyld_NSLinkModule
#11 0x900257d5 in NSLinkModule
#12 0x9617f4fc in undefinedHandler
#13 0x8fe03651 in _dyld__ZN4dyld18findExportedSymbolEPKcbPPKN11ImageLoader6SymbolEPPS2
#14 0x8fe036bf in _dyld__ZN4dyld22flatFindExportedSymbolEPKcPPKN11ImageLoader6SymbolEPPS2
#15 0x8fe076d1 in __dyld_NSLookupAndBindSymbol
#16 0x9014a875 in NSLookupAndBindSymbol
#17 0x00002499 in start

thanks,

c.

have you tried cleaning all targets (from Build menu) and then rebuild the juce library in debug ?

I used to have that kind of messages when my app was failing to link with juce library. (I was calling methods that had disappeared in the new version of juce) Have you updated juce version recently ?

Yup. My Lib is the latest. And yes, I did clean+rebuild.

What is strange is that everything works as it is supposed to on the demos supplied… just not in the project file I made (which was basically copy/pasted from one of the demos). I must have changed something that is making it act the way it is, but I can’t figure out what. It would be nice if there were some supplied instructions as to how to properly set up an Xcode project file from scratch. Even better: one of those fancy new project wizards.

It’s probably something silly, and it also probably comes from my inexperience… I mostly deal with Java, so setting up project files in either VC++ or Xcode is still a little bit of a mystery to me.

thanks,

c.

Are you sure that the original demo that you copied/pasted wasn’t a former code corresponding to a former juce release ?

I’ll try doing it again, but I’ve only downloaded the lib once, so everything should be the way it should be. Or at least the way it was distributed. As I said before, I compiled the demos that came with Juce, and they work fine in debug and release, so I don’t think that it is the lib that’s the problem…

c.

Hey All,

So I did the project over again and now it works… I would really love to know what the hell I did though. I think I did basically the same thing, but I would rather know how to set up a project from scratch. Perhaps this will make me understand where I went wrong.

Anyways, thanks for the replies.

c.

You may have ZeroLink set wrong in your target settings.

I tried it on and off, with no success. Which one is the right way? on or off??