Pages: [1]
Author Topic: Xcode 4 Error: Undefined symbols for architecture i386  (Read 4962 times)
SBA

Posts: 9

Gravatar


Xcode 4 Error: Undefined symbols for architecture i386
« on: August 04, 2011, 08:34:46 AM »

Hi people,

After switching Xcode 4 and oF7 I am haunted by Apple Mach-O Linker (Id) Error..

I can run examples, but whenever I try to create a new project (and add something from addons), I immediately get this error...


The log looks like this:

Quote
Ld bin/123Debug.app/Contents/MacOS/123Debug normal i386
    cd /Users/This/Documents/of_preRelease_v007_osx/apps/addonsExamples/123
    /Developer/usr/bin/g++-4.2 -arch i386 -L/Users/This/Documents/of_preRelease_v007_osx/apps/addonsExamples/123/bin -F/Users/This/Documents/of_preRelease_v007_osx/apps/addonsExamples/123/bin -F/Users/This/Documents/of_preRelease_v007_osx/apps/addonsExamples/123/../../../libs/glut/lib/osx -filelist /Users/This/Documents/of_preRelease_v007_osx/apps/addonsExamples/123/build/123.build/Debug/123.build/Objects-normal/i386/123Debug.LinkFileList -dead_strip ../../../libs/poco/lib/osx/PocoFoundation.a ../../../libs/poco/lib/osx/PocoNet.a ../../../libs/poco/lib/osx/PocoXML.a ../../../libs/poco/lib/osx/PocoUtil.a ../../../libs/tess2/lib/osx/tess2.a ../../../libs/glew/lib/osx/glew.a ../../../libs/cairo/lib/osx/cairo-script-interpreter.a ../../../libs/cairo/lib/osx/cairo.a ../../../libs/cairo/lib/osx/pixman-1.a ../../../libs/fmodex/lib/osx/libfmodex.dylib ../../../libs/rtAudio/lib/osx/rtAudio.a ../../../addons/ofxOpenCv/libs/opencv/lib/osx/opencv.a -framework GLUT /Users/This/Documents/of_preRelease_v007_osx/libs/openFrameworksCompiled/lib/osx/openFrameworksDebug.a -framework AGL -framework ApplicationServices -framework AudioToolbox -framework Carbon -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework QuickTime -framework AppKit -framework Cocoa -framework IOKit -o /Users/This/Documents/of_preRelease_v007_osx/apps/addonsExamples/123/bin/123Debug.app/Contents/MacOS/123Debug



Undefined symbols for architecture i386:
  "ofxDelaunay::ofxDelaunay(int)", referenced from:
.
.
.
.
.

ld: symbol(s) not found for architecture i386
collect2: ld returned 1 exit status



This log is from ofxDelaunay but I get the same when I try to add OpenCV to new Empty Example..


I tried all the solutions I could find (one by one, altogether and in all possible combinations) such as..

1) Setting Symbol Hidden by Default  to YES (for both example scheme & of scheme)
2) Clean build
3) Changed build architecture..
4) Compared Build Setting of example and new project line by line..

Apparently it's some Xcode4 nuance, that I'm missing...  Can somebody please point out..?
Logged
kitschpatrol

Posts: 9

Gravatar


Re: Xcode 4 Error: Undefined symbols for architecture i386
« Reply #1 on: October 27, 2011, 07:37:48 PM »

Getting the same error in XCode 4 with OpenNI. Will post if I figure it out.
Logged
Seth
Global Moderator
California

Posts: 580

Gravatar


WWW
Re: Xcode 4 Error: Undefined symbols for architecture i386
« Reply #2 on: November 22, 2011, 11:24:34 PM »

Did you ever figure this out?
Logged

tcfr33

Posts: 6

Gravatar


Re: Xcode 4 Error: Undefined symbols for architecture i386
« Reply #3 on: February 03, 2012, 11:11:34 PM »

I've been having the same problems with compiling in OSX 10.7 XCode 4 on many of the addon examples. Here is one specific example but it is the same problem with most addons I've tried to compile. I receive an Undefined symbols for architecture i386 link error. I am compiling everything using 10.6, 32bit with oF007.  Does anyone know what's going on?

Thanks


Code:
Ld bin/MSAFluidExample.app/Contents/MacOS/MSAFluidExample normal i386
    cd /Developer/OpenFrameworks/of_preRelease_v007_osx/apps/addonsExamples/MSAFLuidExample
    setenv MACOSX_DEPLOYMENT_TARGET 10.6
    /Developer/usr/bin/clang++ -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -L/Developer/OpenFrameworks/of_preRelease_v007_osx/apps/addonsExamples/MSAFLuidExample/bin -L/Developer/OpenFrameworks/of_preRelease_v007_osx/libs/openFrameworksCompiled/lib/osx -F/Developer/OpenFrameworks/of_preRelease_v007_osx/apps/addonsExamples/MSAFLuidExample/bin -F/Developer/OpenFrameworks/of_preRelease_v007_osx/apps/addonsExamples/MSAFLuidExample/../../../libs/glut/lib/osx -filelist /Users/tcfr33/Library/Developer/Xcode/DerivedData/MSAFluidExample-dbmhhastsodlcccjzncbkslxuwxy/Build/Intermediates/MSAFluidExample.build/Release/MSAFluidExample.build/Objects-normal/i386/MSAFluidExample.LinkFileList -mmacosx-version-min=10.6 -dead_strip ../../../libs/poco/lib/osx/PocoFoundation.a ../../../libs/poco/lib/osx/PocoNet.a ../../../libs/poco/lib/osx/PocoXML.a ../../../libs/poco/lib/osx/PocoUtil.a ../../../libs/tess2/lib/osx/tess2.a ../../../libs/glew/lib/osx/glew.a ../../../libs/cairo/lib/osx/cairo-script-interpreter.a ../../../libs/cairo/lib/osx/cairo.a ../../../libs/cairo/lib/osx/pixman-1.a ../../../libs/fmodex/lib/osx/libfmodex.dylib ../../../libs/rtAudio/lib/osx/rtAudio.a /Developer/OpenFrameworks/of_preRelease_v007_osx/libs/openFrameworksCompiled/lib/osx/openFrameworks.a -weak_library /Developer/OpenFrameworks/of_preRelease_v007_osx/libs/openFrameworksCompiled/lib/osx/openFrameworks.a -framework GLUT -framework AGL -framework ApplicationServices -framework AudioToolbox -framework Carbon -framework CoreAudio -framework CoreFoundation -framework CoreServices -framework OpenGL -framework QuickTime -framework AppKit -framework Cocoa -framework IOKit -o /Developer/OpenFrameworks/of_preRelease_v007_osx/apps/addonsExamples/MSAFLuidExample/bin/MSAFluidExample.app/Contents/MacOS/MSAFluidExample

Undefined symbols for architecture i386:
  "MSA::FluidSolver::enableRGB(bool)", referenced from:
      msaFluidParticlesApp::setup() in msaFluidParticlesApp.o
  "MSA::FluidSolver::setFadeSpeed(float)", referenced from:
      msaFluidParticlesApp::setup() in msaFluidParticlesApp.o
  "MSA::FluidSolver::setSize(int, int)", referenced from:
      msaFluidParticlesApp::update() in msaFluidParticlesApp.o
  "typeinfo for MSA::FluidDrawerBase", referenced from:
      typeinfo for MSA::FluidDrawerGl in main.o
  "MSA::FluidDrawerBase::FluidDrawerBase()", referenced from:
      msaFluidParticlesApp::msaFluidParticlesApp() in main.o
  "MSA::FluidSolver::FluidSolver()", referenced from:
      msaFluidParticlesApp::msaFluidParticlesApp() in main.o
  "MSA::FluidDrawerBase::setDrawMode(MSA::FluidDrawMode)", referenced from:
      msaFluidParticlesApp::keyPressed(int) in msaFluidParticlesApp.o
  "MSA::FluidSolver::getWidth() const", referenced from:
      MSA::FluidDrawerGl::createTexture() in main.o
  "MSA::FluidSolver::reset()", referenced from:
      msaFluidParticlesApp::keyPressed(int) in msaFluidParticlesApp.o
  "MSA::FluidDrawerBase::setup(MSA::FluidSolver*)", referenced from:
      msaFluidParticlesApp::setup() in msaFluidParticlesApp.o
      msaFluidParticlesApp::update() in msaFluidParticlesApp.o
  "MSA::FluidSolver::setDeltaT(float)", referenced from:
      msaFluidParticlesApp::setup() in msaFluidParticlesApp.o
  "MSA::FluidSolver::setVisc(float)", referenced from:
      msaFluidParticlesApp::setup() in msaFluidParticlesApp.o
  "MSA::FluidSolver::setColorDiffusion(float)", referenced from:
      msaFluidParticlesApp::setup() in msaFluidParticlesApp.o
  "MSA::FluidDrawerBase::draw(float, float)", referenced from:
      vtable for MSA::FluidDrawerGl in main.o
  "MSA::FluidSolver::setup(int, int)", referenced from:
      msaFluidParticlesApp::setup() in msaFluidParticlesApp.o
  "MSA::FluidSolver::update()", referenced from:
      msaFluidParticlesApp::update() in msaFluidParticlesApp.o
      msaFluidParticlesApp::keyPressed(int) in msaFluidParticlesApp.o
  "MSA::FluidDrawerBase::draw(float, float, float, float)", referenced from:
      vtable for MSA::FluidDrawerGl in main.o
  "MSA::FluidDrawerBase::~FluidDrawerBase()", referenced from:
      msaFluidParticlesApp::msaFluidParticlesApp() in main.o
      MSA::FluidDrawerGl::~FluidDrawerGl() in main.o
      MSA::FluidDrawerGl::~FluidDrawerGl() in main.o
      msaFluidParticlesApp::~msaFluidParticlesApp() in msaFluidParticlesApp.o
  "MSA::FluidSolver::~FluidSolver()", referenced from:
      msaFluidParticlesApp::msaFluidParticlesApp() in main.o
      msaFluidParticlesApp::~msaFluidParticlesApp() in msaFluidParticlesApp.o
  "MSA::ColorT<float>::ColorT(MSA::ColorModel, float, float, float)", referenced from:
      msaFluidParticlesApp::addToFluid(MSA::Vec2<float>, MSA::Vec2<float>, bool, bool) in msaFluidParticlesApp.o
      Particle::updateVertexArrays(bool, MSA::Vec2<float> const&, int, float*, float*) in Particle.o
  "MSA::FluidSolver::getHeight() const", referenced from:
      MSA::FluidDrawerGl::createTexture() in main.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Logged
nicos

Posts: 3

Gravatar


Re: Xcode 4 Error: Undefined symbols for architecture i386
« Reply #4 on: February 03, 2013, 01:21:19 PM »

Hi !
I've started playing around with openFramweork for a couple of days and start to really enjoy it... But I'm stuck with this error...
Got the same problem when compiling with an addOn (ofxGifEncoder https://github.com/jesusgollonet/ofxGifEncoder ) on os X 10.8.2 and xCode 4.6

What is weird is that when I compile the example provided with the addon it compiles just fine...

does anybody know why we get this error ? It seems like it's not specific to this addon... please, my project is stuck...
Logged
theo
Administrator
Amsterdam

Posts: 1090

Gravatar


WWW
Re: Xcode 4 Error: Undefined symbols for architecture i386
« Reply #5 on: February 03, 2013, 03:46:47 PM »

can you check the build phases section of the target settings ( not OF but see image here for where it is http://www.thinketg.com/Images/Frameworks-2.jpg ) ?

you should see the .cpp files of the addon in there ( compile sources section )

if you don't can you try re-adding the files to xcode ( drag them into the file section ) and make sure the box is checked for adding the files to the OF app target.
Logged

Pages: [1]
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines
kinect

viagra priser