Register FAQ / Rules Forum Spy Search Today's Posts Mark Forums Read
Go Back   MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Reply
 
Thread Tools Search this Thread Display Modes
Old Jan 30, 2009, 05:23 PM   #1
gdscott
macrumors newbie
 
Join Date: Jan 2009
Location: San Diego
Zthreads on Mac OS X Help

I created a simple C++ program on Macbook Pro (Leopard 10.5.6) to play with the ZThreads open source framework. I downloaded the ZThread 2.3.2 source from sourceforge and compiled it (eg.. ./configure -> make -> make install). I built my test application using Eclipse and linked the ZThread.la library into my application. The application compiles/links successfully but when I try run my application within the Eclipse IDE, I get the following errors:


dyld: lazy symbol binding failed: Symbol not found: __MPIsFullyInitialized
Referenced from: /usr/local/lib/libZThread-2.3.2.dylib
Expected in: flat namespace

dyld: Symbol not found: __MPIsFullyInitialized
Referenced from: /usr/local/lib/libZThread-2.3.2.dylib
Expected in: flat namespace

Any ideas on what could be causing these errors????
gdscott is offline   0 Reply With Quote
Old Jan 30, 2009, 07:19 PM   #2
yeroen
macrumors 6502a
 
yeroen's Avatar
 
Join Date: Mar 2007
Location: Cambridge, MA
You need to link to the CoreServices.framework.

Some digging around with the 'nm' command-line utility reveals the symbol
__MPIsFullyInitialized is defined in /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework.

If you do an 'otool -L' on your executable, does CoreServices show up as being linked against it?
__________________
all Jarvis, all the time

Last edited by yeroen; Jan 30, 2009 at 07:25 PM.
yeroen is offline   0 Reply With Quote
Old Jan 30, 2009, 07:51 PM   #3
gdscott
Thread Starter
macrumors newbie
 
Join Date: Jan 2009
Location: San Diego
I ran the 'otool -L' on my executable called Zthread and this is what I got:

$ otool -L Zthread
Zthread:
/usr/local/lib/libZThread-2.3.2.dylib (compatibility version 3.0.0, current version 3.0.0)
/usr/lib/libstdc++.6.dylib (compatibility version 7.0.0, current version 7.4.0)
/usr/lib/libgcc_s.1.dylib (compatibility version 1.0.0, current version 1.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 111.1.3)
gdscott is offline   0 Reply With Quote
Old Jan 31, 2009, 12:16 PM   #4
yeroen
macrumors 6502a
 
yeroen's Avatar
 
Join Date: Mar 2007
Location: Cambridge, MA
What happens when you compile/link/execute outside the Eclipse IDE?
(I'm not sure what kind of environment your executables inherit when they're run from Eclipse.)

You can also explicitly set the DYLD_FRAMEWORK_PATH environment variable to the /System/Library/Frameworks, i.e. in the shell:

export DYLD_FRAMEWORK_PATH=/System/Library/Frameworks

Then launch your executable from the shell (see the dyld man page for more useful dyld environment variables).
__________________
all Jarvis, all the time
yeroen is offline   0 Reply With Quote

Reply
MacRumors Forums > Apple Systems and Services > Programming > Mac Programming

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
thread Thread Starter Forum Replies Last Post
mac to windows and ten years later back to Mac, need some alternative app suggestions debudebu Mac Applications and Mac App Store 1 Apr 5, 2014 02:53 PM
Migration assistant (Mac - Mac). New mac has mutiple drives, can't pick the right one Daftones MacBook Pro 4 Aug 29, 2013 09:32 AM
Linux and mac shared Data partition. (paragon extFS-mac, ntfs-mac, ntfs-3G ?) HiDeHo OS X 10.8 Mountain Lion 15 Jul 17, 2013 05:09 PM
Convert from Mac Pro to Mac Mini - high reliability backup solution? sdardens Mac Peripherals 3 Apr 7, 2013 10:03 PM
For Lion Server: 2011 Mac mini, 2006/8 Mac Pro, or Hackintosh? Yebubbleman Mac mini 0 Mar 15, 2013 12:14 AM

Forum Jump

All times are GMT -5. The time now is 04:31 AM.

Mac Rumors | Mac | iPhone | iPhone Game Reviews | iPhone Apps

Mobile Version | Fixed | Fluid | Fluid HD
Copyright 2002-2013, MacRumors.com, LLC