Hi all,
I get this error in both OF v0.8.0
and in a recent nightly build.
I have used testApp::keyReleased(int) before without any problem.
also ofApp::keyPressed(int) works fine.
only ofApp::keyReleased(int) causes the build to fail.
what could be the problem?
Did you delete it from the header? ( I do this all the time)
I donât even think I have opened up the header ! 
also, deleting it accidentaly from BOTH v0.8 and the nightly build sounds too much of a chance, unless they look into the same location.
where is that header located?
I think he meant your ofApp.h project file, like: ./openFrameworks/apps/myapps/yourprojectname/ofApp.h
.
If you deleted it there AND you didnât regenerate your project in both the 0.8 and nightly builds, then that seems likely that it was the cause of your build error.
But if that doesnât fix it, whatâs the specific error you get?
when you say âregenerateâ how do you mean I should do it? completely create a new project from scratch? or just clean and rebuild ?
The error that I get is the following
"src/ofApp.cpp|424|error: no âvoid ofApp::keyReleased(int)â member function declared in class âofAppâ "
and my code is :
void ofApp::keyReleased(int key){
if ( !kin.keysDelegationReleased(key) ){
//if key was not intercepted by kinect classâŚ
}
}
Why should it matter if I deleted it earlier or not?
The fact is that this is not my code and , indeed, the âkeyReleased(key)â function was not present. So I typed it in. Shouldnât this be sufficient?
if not, what should I do?
Thank you for your help!
Yes - check the header file. You need to declare the method both in the header (.h) and the .cpp file (looks like you have done this already)
Since this is not your code it sounds like the original author deleted the method from ofApp.h and ofApp.cpp.
1 Like
Sorry - didnât realize this wasnât your code. By regenerate, I meant create it from scratch using project generator (which would have generated the appropriate functions in both ofApp.h
and ofApp.cpp
).
But yeah, just do what @jvcleave said - add a keyReleased function declaration to ofApp.h.