• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Need help - internal link edit command failed - undefined symbol ) _DisposePtr, _NewPtr
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help - internal link edit command failed - undefined symbol ) _DisposePtr, _NewPtr


  • Subject: Need help - internal link edit command failed - undefined symbol ) _DisposePtr, _NewPtr
  • From: Daniel Stenning <email@hidden>
  • Date: Thu, 15 Nov 2007 16:46:43 +0000
  • Thread-topic: Need help - internal link edit command failed - undefined symbol ) _DisposePtr, _NewPtr

I am getting linker errors when compiling a very simple dylib in Xcode.

The code simply calls C++ functions that are in a static library  ( Dirac )
And wraps them in extern C functions to allow the functions to be exposed as
C functions in my dylib.

Anyone now how to fix ?

There is a single header file - Dirac.h  which simply contains forward
declares for the Dirac library. Naturally I have both the dirac library and
its header in my project.

    cd /Users/dstenning/Developer/Colours/CPP/Dirac
    /usr/bin/g++-4.0 -o
/Users/dstenning/Developer/Colours/CPP/Dirac/build/Debug/libDirac.dylib
-L/Users/dstenning/Developer/Colours/CPP/Dirac/build/Debug
-L/Users/dstenning/Developer/Colours/CPP/Dirac/../../../Libraries/DIRAC\
LE/MacOS\ X/Source
-F/Users/dstenning/Developer/Colours/CPP/Dirac/build/Debug -filelist
/Users/dstenning/Developer/Colours/CPP/Dirac/build/Dirac.build/Debug/Dirac.b
uild/Objects-normal/i386/Dirac.LinkFileList -lDiracLE -arch i386
-Wl,-single_module -compatibility_version 1 -current_version 1 -install_name
/usr/local/lib/libDirac.dylib -Wl,-Y,1455 -dynamiclib
-mmacosx-version-min=10.4 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
ld: Undefined symbols:
_DisposePtr
_NewPtr
/Users/dstenning/Developer/Colours/CPP/Dirac/../../../Libraries/DIRAC
LE/MacOS X/Source/libDiracLE.a(Dirac.o) reference to undefined _DisposePtr
/Users/dstenning/Developer/Colours/CPP/Dirac/../../../Libraries/DIRAC
LE/MacOS X/Source/libDiracLE.a(Dirac.o) reference to undefined _NewPtr
/usr/bin/libtool: internal link edit command failed
    ld: Undefined symbols:
    _DisposePtr
    _NewPtr
    /Users/dstenning/Developer/Colours/CPP/Dirac/../../../Libraries/DIRAC
LE/MacOS X/Source/libDiracLE.a(Dirac.o) reference to undefined _DisposePtr
    /Users/dstenning/Developer/Colours/CPP/Dirac/../../../Libraries/DIRAC
LE/MacOS X/Source/libDiracLE.a(Dirac.o) reference to undefined _NewPtr
    /usr/bin/libtool: internal link edit command failed


Here is the C++ code:

/*

*/

// #define bool int

#include <Dirac.h>


#ifndef __DiracD__
#define __DiracD__

extern "C"
{

const char *DiracDVersion(void) {
    return DiracVersion();
}

/*

void *DiracDCreate(long lambda, long quality, long numChannels, float
sampleRate, void* readFromChannelsCallback ) {
    return DiracCreate( lambda, quality, numChannels, sampleRate,
readFromChannelsCallback );
}



long DiracDSetProperty(long selector, long double value, void *Dirac) {
    return DiracSetProperty( selector, value, Dirac);
}

long double DiracDGetProperty(long selector, void *Dirac) {
    return DiracGetProperty( selector, Dirac);
}

void DiracDReset(bool clear, void *Dirac) {
    DiracReset( clear, Dirac);
}

long DiracDProcess(float **audioOut, long numFrames, void *userData, void
*Dirac) {
    return  DiracProcess( audioOut, numFrames, userData, Dirac);
}

void DiracDDestroy(void *Dirac) {
    DiracDestroy(Dirac);
}

long DiracDGetInputBufferSizeInFrames(void *Dirac) {
    return DiracGetInputBufferSizeInFrames(Dirac);
}


*/
Cheers,
Dan




 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Need help - internal link edit command failed - undefined symbol ) _DisposePtr, _NewPtr
      • From: Philip Aker <email@hidden>
  • Prev by Date: Re: troubles with including an .so file
  • Next by Date: Re: Newbie Q: SenTestCase linking problem
  • Previous by thread: Re: Switching tab views in Interface Builder
  • Next by thread: Re: Need help - internal link edit command failed - undefined symbol ) _DisposePtr, _NewPtr
  • Index(es):
    • Date
    • Thread