Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Undefined symboles for architecture i386" on OS X using OF 0.8 #99

Open
zeitkunst opened this issue Mar 15, 2014 · 3 comments
Open

"Undefined symboles for architecture i386" on OS X using OF 0.8 #99

zeitkunst opened this issue Mar 15, 2014 · 3 comments

Comments

@zeitkunst
Copy link

I'm not able to compile ofxTimeline on OS X using OF 0.8 as a result of a number of "undefined symbols" errors. This occurs either on the master or develop branches. I'm also compiling from the command-line...might this be causing the problems? It seems as if I just need to add some entries to my PROJECT_LDFLAGS, but I'm not sure which ones might help resolve these errors...

Thanks in advance for your help.

Undefined symbols for architecture i386:
  "ofGetModifierPressed(ofxModifierKey)", referenced from:
      ofxTimeline::keyPressed(ofKeyEventArgs&) in ofxTimeline.o
      ofxTLColorTrack::mouseReleased(ofMouseEventArgs&, long) in ofxTLColorTrack.o
      ofxTLCurves::mouseReleased(ofMouseEventArgs&, long) in ofxTLCurves.o
      ofxTLKeyframes::mousePressed(ofMouseEventArgs&, long) in ofxTLKeyframes.o
      ofxTLLFO::mouseReleased(ofMouseEventArgs&, long) in ofxTLLFO.o
      ofxTLPage::mousePressed(ofMouseEventArgs&, long) in ofxTLPage.o
  "ofGetModifierSelection()", referenced from:
      ofxTLFlags::mousePressed(ofMouseEventArgs&, long) in ofxTLFlags.o
      ofxTLFlags::mouseReleased(ofMouseEventArgs&, long) in ofxTLFlags.o
      ofxTLKeyframes::mousePressed(ofMouseEventArgs&, long) in ofxTLKeyframes.o
      ofxTLPage::mouseReleased(ofMouseEventArgs&, long) in ofxTLPage.o
      ofxTLSwitches::mousePressed(ofMouseEventArgs&, long) in ofxTLSwitches.o
      ofxTLSwitches::mouseReleased(ofMouseEventArgs&, long) in ofxTLSwitches.o
  "RemoveCocoaMenusFromGlut(std::string)", referenced from:
      ofxTimeline::removeCocoaMenusFromGlut(std::string) in ofxTimeline.o
  "ofGetModifierShortcutKeyPressed()", referenced from:
      ofxTimeline::keyPressed(ofKeyEventArgs&) in ofxTimeline.o
  "_alBufferData", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::loadSound(std::string, bool) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::threadedFunction() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alDeleteBuffers", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::unloadSound() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alDeleteSources", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::update(ofEventArgs&) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::unloadSound() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alGenBuffers", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::loadSound(std::string, bool) in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alGenSources", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::loadSound(std::string, bool) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::play() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alGetError", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::loadSound(std::string, bool) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::play() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alGetSourcef", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::getPosition() in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::getPositionMS() in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::getCurrentBufferSum(int) in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alGetSourcei", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::threadedFunction() in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::update(ofEventArgs&) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::getIsPlaying() in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::getIsPaused() in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::getCurrentBufferSum(int) in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alListener3f", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::initialize() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alSourcePausev", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::setPaused(bool) in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alSourcePlayv", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::threadedFunction() in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::setPaused(bool) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::play() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alSourceQueueBuffers", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::loadSound(std::string, bool) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::threadedFunction() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alSourceStopv", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::stop() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alSourceUnqueueBuffers", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::threadedFunction() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alSourcef", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::loadSound(std::string, bool) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::setVolume(float) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::setPosition(float) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::setPan(float) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::setSpeed(float) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::play() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alSourcefv", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::loadSound(std::string, bool) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::setPan(float) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::play() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alSourcei", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::loadSound(std::string, bool) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::setLoop(bool) in ofOpenALSoundPlayer_TimelineAdditions.o
      ofOpenALSoundPlayer_TimelineAdditions::play() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alcCloseDevice", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::close() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alcCreateContext", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::initialize() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alcDestroyContext", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::close() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alcMakeContextCurrent", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::initialize() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alcOpenDevice", referenced from:
      ofOpenALSoundPlayer_TimelineAdditions::initialize() in ofOpenALSoundPlayer_TimelineAdditions.o
  "_alcProcessContext", referenced from:
      ofOpenALSoundUpdate_TimelineAdditions() in ofOpenALSoundPlayer_TimelineAdditions.o
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)
@zeitkunst
Copy link
Author

If I had watched the video, I would have realized that I needed to add "-framework OpenAL". So that takes care of the OpenAL linking errors. The other linking errors still exist, and it seems as if they have to do with Objective-C files not getting compiled when called from the Makefile. Any suggestions of how to fix this?

@zeitkunst
Copy link
Author

Okay, figured this out through a slightly hacky way:

  • First, compile ofxHostKeys_impl_mac.mm and ofxRemoveCocoaMenu.mm by hand by using one of the previous ofxTimeline compile steps as a template. Be sure to change the paths for each location where a *.o or *.d file is being created.
  • Then, under PROJECT_LDFLAGS, add the following:
-framework OpenAL  ../../../addons/obj/osx/Release/ofxTimeline/src/ofxHotKeys_impl_mac.o ../../../addons/obj/osx/Release/ofxTimeline/src/ofxRemoveCocoaMenu.o

This should persist until the next time you run make clean.

If anyone has a better solution, please let me know!

@andyinabox
Copy link

Thanks @zeitkunst -- I have the same issue and trying your solution. Do you have any examples for how you compiled ofxHostKeys_impl_mac.mm and ofxRemoveCocoaMenu.mm?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants