Today I spend some time figuring out how to make the code compile under windows. Basically I had to install a MinGW/MSYS environment and fix some makefiles to get it working. To hopefully help out other users of OF, I wrote a tutorial on how to patch the source and build it on windows :).
To install, just unzip the package to wherever you’ve placed OF. For example if its C:\temp\OF… you should unzip it to C:\temp\ . Just overwrite all existing Makefiles and adjust paths.make if you need.
Looks like the problem was that I had spaces in my Android NDK and SDK paths. Probably should have picked up on this from the multiple locations it was written. Apparently the work around PROGRA~2 does not work!
For those who upgraded to SDK r14, you will need to run “android update project” on the ofAndroidLib project. Otherwise the examples will fail to build. I’ve updated the EmptyExample and ofAndroidLib in my branch on GitHub: https://github.com/falcon4ever/openFrameworks I’ll be updating the other examples soon.
Yea if you’re running with SDK r12 you should be fine. It’s not a big deal to upgrade to r14 though, you can either run the android update project on the ofAndroidLib yourself or just do a checkout of the version i placed on github (be sure to select the development branch).
I’m getting it to build fine but I can’t seem to get it to run. It crashes with the following ClassNotFound exception, on both emulator and device:
12-09 16:10:42.339: E/AndroidRuntime(1867): Caused by: java.lang.ClassNotFoundException: cc.openframeworks.androidTouchExample.OFActivity in loader dalvik.system.PathClassLoader[/mnt/asec/cc.openframeworks.androidTouchExample-1/pkg.apk]
12-09 16:10:42.339: E/AndroidRuntime(1867): at dalvik.system.PathClassLoader.findClass(PathClassLoader.java:240)
12-09 16:10:42.339: E/AndroidRuntime(1867): at java.lang.ClassLoader.loadClass(ClassLoader.java:551)
12-09 16:10:42.339: E/AndroidRuntime(1867): at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
12-09 16:10:42.339: E/AndroidRuntime(1867): at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
12-09 16:10:42.339: E/AndroidRuntime(1867): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1672)
12-09 16:10:42.339: E/AndroidRuntime(1867): … 11 more
I’m using NDK r7.
the falcon4ever openframeworks branch.
Java SE 6 Update 29
I tried the nokia mingw and had a similar crash, but this is built from a fresh install (fresh installed everything and tried again) the official MinGW from sourceforge.
I had the pkg-config bug but I fixed it with mingw wiki faq.
Any help would be appreciated. And the time you’ve already put into putting together such a comprehensive tutorial.
The only thing I edited was the paths.make file since I already have the sdk/ndk installed in different paths. But I did verify that the changes in your guide where made in the branch. I really don’t know what to try I’ve tried redownloading all the major components twice now with different version of mingw and java. I don’t know what else to try.