Build error after I modified main.cpp

Hi all !

I’ve managed to get a functioning Eclipse environment for OF 0.8.4 and run several times some examples on a real device…

  1. I got XXX could not be resolved for OF symbols in many places, but only as errors in source editor, it didn’t affected the build process
  2. Then after I modified a source code (for example, replacing OF_WINDOW with OF_FULLSCREEN in main.cpp) the project start to fail building/running with different kind of errors

It happen with multiple OF examples

Build clean and build all don’t solve it…

For example, I get these errors, in the “Problems” panel, related to several OF examples

  1. Android NDK: WARNING: There are no modules to build in this project! androidVideoExample
  2. Invalid arguments ’
    Candidates are:
    void ofRunApp(ofPtr)
    void ofRunApp(ofBaseApp *)
  3. Type ‘ofxAndroidSwipeDir’ could not be resolved ofApp.cpp /androidEmptyExample/src

For 2) the source code is

#include "ofMain.h"
#include "ofApp.h"

int main(){
	ofSetupOpenGL(1024,768, OF_WINDOW);			// <-------- setup the GL context

	// this kicks off the running of my app
	// can be OF_WINDOW or OF_FULLSCREEN
	// pass in width and height too:
	ofRunApp(new ofApp());

	return 0;
}


#ifdef TARGET_ANDROID
#include <jni.h>

//========================================================================
extern "C"{
	void Java_cc_openframeworks_OFAndroid_init( JNIEnv*  env, jobject  thiz ){
		main();
	}
}
#endif

Any idea ? Thank you !

the semantic analizer in eclipse looks for errors in real time while you type, before compiling. somtimes it will have some false positives and find errors where there are none. adt, the android plugin forr eclipse will refuse to start if it finds any errors, you can just remove them from the problems view and it’ll run the application fine. you can also disable the semantic analisys in window > preferences > c/c++ > code analisys and there disable potential programming problems.

if you use the nightly builds is disabled by default in the projects instead of the general preferences but also works much better if you enable it

1 Like

Thanks that solved my problems !! -:wink: