ofxMSAInteractiveObject in latest stable branch (084)

Hi All,

I need to resurrect an old OF 072 project and get it compiling with the latest stable branch of OF 084. The problem I am stuck on is getting ofxMSAInteractiveObject to compile. It fails with the below errors.

Any advice hugely appreciated as I have an upcoming deadline for this project and would hate to roll back to OF 072. I am developing on OSX 10.10 although I believe I need to deploy on OSX 10.7 - hoping to compile a universal binary. Test project compiles fine until trying to create an instance of ofxMSAInteractiveObject.

Undefined symbols for architecture x86_64:
  "typeinfo for ofxMSAInteractiveObject", referenced from:
      typeinfo for MyObject in ofApp.o
  "ofSetupOpenGL(int, int, int)", referenced from:
      _main in main.o
  "ofxMSAInteractiveObject::ofxMSAInteractiveObject()", referenced from:
      MyObject::MyObject() in ofApp.o
  "ofxMSAInteractiveObject::~ofxMSAInteractiveObject()", referenced from:
      MyObject::~MyObject() in ofApp.o
  "ofxMSAInteractiveObject::hitTest(int, int) const", referenced from:
      vtable for MyObject in ofApp.o
  "ofRunApp(ofBaseApp*)", referenced from:
      _main in main.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

EDIT - note that this happens with the latest stable branch or the 084 download. The project was created with the project generator from the latest stable branch. Using latest official version of addon from here - didn’t see any forks with relevant updates:

I’ve attached a project that recreates the issue if someone would be kind enough to take a look.

newProjectName.zip (74.4 KB)

Hi, you’re running into some C++ inheritance and virtual function arcana I’m not very good with, but I did get your project compiling.

It’s possibly related to this:

I changed the constructor and destructor definitions in ofxMSAInteractiveObject to give them a definition in the header file and that seemed to do the trick. Might totally blow up somewhere else now though!

newProjectNameNew.zip (133.1 KB)

Thanks @hahahkid,
Sadly when applying this fix I get similar errors when ever a child class calls one of the inherited functions:

Undefined symbols for architecture i386:
  "ofxMSAInteractiveObject::disableMouseEvents()", referenced from:
      nayFootPrinter::~nayFootPrinter() in ofApp.o

I have wrestled with this and tried rolling back to OF 072 with OSX SDK 10.7 but even with an empty example I get a bunch of other compiler errors relating to FreeImage that I’ve not been able to resolve.

Undefined symbols for architecture i386:
  "_FreeImage_Initialise", referenced from:
      ofInitFreeImage(bool) in openFrameworksDebug.a(ofImage.o)
  "_FreeImage_DeInitialise", referenced from:
      ofInitFreeImage(bool) in openFrameworksDebug.a(ofImage.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I guess I should pursue the former approach but I’m still at a loss. Hope I don’t end up needing to replace ofxMSAInteractiveObject with something custom.

just grabbed a recent copy of ofxMSAInteraciveObject here:

and made sure that all *.cpp files in my project were checked as members for my target and is now compiling - phew!

thanks again - now on to all the other issues that pop up when you resurrect something this old :wink: