elliotwoods / ofxplugin Goto Github PK
View Code? Open in Web Editor NEWWrite plugins in openFrameworks which you can load into your openFrameworks application at run time
Write plugins in openFrameworks which you can load into your openFrameworks application at run time
Hey,
Thanks for your making this plugin, this is great! :D
I forked ofxPlugin and improved it a bit:
.dylib
to .bundle
which seems to be more appropriate for plugins.Now the exampleApp launches and loads the circle plugin but gives some errors then crashes as soon as the circle plugin calls the OF renderer context.
I've been looking for a solutions without success...
Does anyone know how to prevent this duplicate symbols problem between the pluginApp and the .bundle
. ? (ping: @satoruhiga )
Here are the errors I get then the .bundle
loads at runtime:
objc[1271]: Class GLUTWindow is implemented in both [..]/exampleAppDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT and /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT. One of the two will be used. Which one is undefined.
objc[1271]: Class GLUTView is implemented in both [..]/exampleAppDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT and /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT. One of the two will be used. Which one is undefined.
objc[1271]: Class GLUTPreferencesController is implemented in both [..]/exampleAppDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT and /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT. One of the two will be used. Which one is undefined.
objc[1271]: Class GLUTMenuItem is implemented in both [..]/exampleAppDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT and /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT. One of the two will be used. Which one is undefined.
objc[1271]: Class GLUTMenu is implemented in both [..]/exampleAppDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT and /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT. One of the two will be used. Which one is undefined.
objc[1271]: Class GLUTUnknownView is implemented in both [..]/exampleAppDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT and /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT. One of the two will be used. Which one is undefined.
objc[1271]: Class GLUTClipboardController is implemented in both [..]/exampleAppDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT and /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT. One of the two will be used. Which one is undefined.
objc[1271]: Class GLUTApplication is implemented in both [..]/exampleAppDebug.app/Contents/Frameworks/GLUT.framework/Versions/A/GLUT and /System/Library/Frameworks/GLUT.framework/Versions/A/GLUT. One of the two will be used. Which one is undefined.
objc[1271]: Class GLFWLayoutListener is implemented in both [..]/exampleAppDebug.app/Contents/MacOS/exampleAppDebug and [..]/examplePlugin.bundle. One of the two will be used. Which one is undefined.
objc[1271]: Class GLFWWindowDelegate is implemented in both [..]/exampleAppDebug.app/Contents/MacOS/exampleAppDebug and [..]/examplePlugin.bundle. One of the two will be used. Which one is undefined.
objc[1271]: Class GLFWApplicationDelegate is implemented in both [..]/exampleAppDebug.app/Contents/MacOS/exampleAppDebug and [..]/examplePlugin.bundle. One of the two will be used. Which one is undefined.
objc[1271]: Class GLFWContentView is implemented in both [..]/exampleAppDebug.app/Contents/MacOS/exampleAppDebug and [..]/examplePlugin.bundle. One of the two will be used. Which one is undefined.
objc[1271]: Class GLFWWindow is implemented in both [..]/exampleAppDebug.app/Contents/MacOS/exampleAppDebug and [..]/examplePlugin.bundle. One of the two will be used. Which one is undefined.
objc[1271]: Class GLFWApplication is implemented in both [..]/exampleAppDebug.app/Contents/MacOS/exampleAppDebug and [..]/examplePlugin.bundle. One of the two will be used. Which one is undefined.
Right now anything with an 'initPlugin' function passes the grade
Rulr needs to be able to handle plugins of different types (e.g. Cameras and Nodes)
So the plugin API needs to handle that internally (only load the right plugins for the right FactoryRegister)
This is some really useful stuff! I'm keen to play with this some more, but bumped into the following:
It seems that the switch over to ofxSingleton
broke the examplePlugin.
While the exampleApp
compiles and runs, examplePlugin
fails to produce a valid .dll
. This is down to a linker error. I get the following messages:
1>plugin.obj : error LNK2001: unresolved external symbol "public: void __cdecl ofxSingleton::Register::setParentRegister(class ofxSingleton::Register *)" (?setParentRegister@Register@ofxSingleton@@QEAAXPEAV12@@Z)
1>plugin.obj : error LNK2001: unresolved external symbol "public: static class std::shared_ptr<class ofxSingleton::Register> __cdecl ofxSingleton::UnmanagedSingleton<class ofxSingleton::Register>::getInstance(void)" (?getInstance@?$UnmanagedSingleton@VRegister@ofxSingleton@@@ofxSingleton@@SA?AV?$shared_ptr@VRegister@ofxSingleton@@@std@@XZ)
I've tried to find out what was going on, but I'm not too familiar with the patterns used, and can't really tell what's missing. Is it possible that there might be a .cpp file missing in the repo?
I've checked earlier commits, and d5ef807 works well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.