I was 'cleaning up' a project and deleted some of the references to libs
used with openFrameworks
. Certain things weren't being used, or so I mistakenly thought... Panic in my project!
All sorts of errors, of course. But, XCode won't let me undo that sort of action. I've re-added the libs
but the errors persist. Can开发者_如何学编程 someone explain to me what basic conceptual thing I'm missing?
Errors go like this [edited]:
/Developer/openFrameworks-iPhone/libs/openFrameworks/app/ofAppGlutWindow.cpp:61: error: 'glutInit' was not declared in this scope
/Developer/openFrameworks-iPhone/libs/openFrameworks/app/ofAppGlutWindow.cpp:62: error: 'GLUT_RGB' was not declared in this scope
/Developer/openFrameworks-iPhone/libs/openFrameworks/app/ofAppGlutWindow.cpp:62: error: 'GLUT_DOUBLE' was not declared in this scope
[UPDATE]. Two things to check: (1) Having a valid build of the oF library itself. Open library project, make sure it builds.
(2) Is the oF library (and all the other, dependent libraries such as Poco) being added in the Build Phases > Link Binary With Libraries section? Sometimes when you delete and then re-add a library, it doesn't get included on this list. Re-drag the library files here. That's what ultimately solved this for me.
Have you tried clean build? I got this error once when adding static libraries.
Found it: Had to manually add the appropriate libraries to be included under "Build Phases". Built the clean download of openFrameworks that way; afterward I could add that to projects referencing the library and build them!
精彩评论