Cannot build openframeworks - linux64 folder missing

Hello,

I have installed OF for android on osx, following the instructions from the website http://www.openframeworks.cc/setup/android-eclipse/

According to the instruction l), I started to import the followings:
openFrameworks/libs
openFrameworks/libs/openFrameworks
openFrameworks/addons/ofxAndroid/ofAndroidLib

Even before adding the example, Eclipse gives errors after building:

  
  
make: *** ../openFrameworksCompiled/project/linux64: No such file or directory.  Stop.	openFrameworks  
  

Indeed I do not have this folder in openframeworks folder. How can I solve this?

Cheers!

it seems like eclipse is trying to compile the linux target, using the button with a hammer icon select the android target and then compile again

Thanks arturo, that was the problem.

But none of the examples are compiling. For example, with TouchExample, I have this:

  
/Users/themojoes/Documents/Development/OFAndroid/adt-bundle/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ../../../libs/openFrameworksCompiled/lib/android/armeabi/libopenFrameworksDebug.a(ofPixels.o): in function __static_initialization_and_destruction_0(int, int):../../../openFrameworks/graphics/ofPixels.cpp:877: error: undefined reference to '__dso_handle'  
/Users/themojoes/Documents/Development/OFAndroid/adt-bundle/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ../../../libs/openFrameworksCompiled/lib/android/armeabi/libopenFrameworksDebug.a(ofVec2f.o): in function __static_initialization_and_destruction_0(int, int):../../../openFrameworks/math/ofVec2f.cpp:13: error: undefined reference to '__dso_handle'  
/Users/themojoes/Documents/Development/OFAndroid/adt-bundle/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ../../../libs/openFrameworksCompiled/lib/android/armeabi/libopenFrameworksDebug.a(ofVec4f.o): in function __static_initialization_and_destruction_0(int, int):../../../openFrameworks/math/ofVec4f.cpp:17: error: undefined reference to '__dso_handle'  
/Users/themojoes/Documents/Development/OFAndroid/adt-bundle/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ../../../libs/openFrameworksCompiled/lib/android/armeabi/libopenFrameworksDebug.a(ofColor.o): in function __static_initialization_and_destruction_0(int, int):../../../openFrameworks/types/ofColor.cpp:5: error: undefined reference to '__dso_handle'  
/Users/themojoes/Documents/Development/OFAndroid/adt-bundle/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ../../../libs/openFrameworksCompiled/lib/android/armeabi/libopenFrameworksDebug.a(ofAppRunner.o): in function ofRunApp(ofBaseApp*):../../../openFrameworks/app/ofAppRunner.cpp:59: error: undefined reference to 'atexit'  
/Users/themojoes/Documents/Development/OFAndroid/adt-bundle/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ../../../libs/openFrameworksCompiled/lib/android/armeabi/libopenFrameworksDebug.a(ofAppRunner.o): in function ofRunApp(ofPtr<ofBaseApp>):../../../openFrameworks/app/ofAppRunner.cpp:155: error: undefined reference to 'atexit'  
collect2: ld returned 1 exit status  
make[1]: *** [libs/armeabi/libOFAndroidApp.so] Error 1  
make: *** [AndroidDebug] Error 2  

All examples have the same errors. Any ideas where they could come from?

yes this problem comes from a change in the latest ndk, it’s already fixed in github, you can download openframeworks from there or install an older ndk (the one recommended in the setup guide)

https://github.com/openframeworks/openFrameworks/archive/develop.zip

if you use openframeworks from git you don’t need to do the last steps in the setup guide, the ones involving creating an external tool to install the application. whenever you want to run an application in the device, just press the play button in the toolbar

ok I downloaded it and now have different errors:

  
  
The container 'Android Dependencies' references non existing library '/Users/themojoes/Documents/Development/OF0073_android-develop/addons/ofxAndroid/ofAndroidLib/bin/ofandroidlib.jar'	android3DModelLoaderExample		Build path	Build Path Problem  
The project cannot be built until build path errors are resolved	android3DModelLoaderExample		Unknown	Java Problem  
  

What is the required version of the ndk for OF0073? I now have r8d. Maybe I should also try to get the r8b version?

cheers!

0073 works with r8b. the version in git works with the latest r8d

that error seems like you are missing the ofAndroidLib project, you need to import it in eclipse. if you’ve already imported it try editing the properties of the project > Android, remove the library, apply the properties and then readd it again

I tried with the git files but it was not working still.
I installed ndk r8b and it now seems to be working.
Thanks for your assistance :).

I got the same problem here as well building the latest github version using NDK r8d. Googled around and found a fix for this. U hv to add $(ndk.root)/platforms/android-5/arch-arm/usr/lib/crtbegin_so.o to the list of system files to be linked in libs/openFrameworksCompiled/project/makefileCommon/Makefile.android. On line 37, change to this :

SYSTEMLIBS += -lsupc++ -lz -lGLESv1_CM -llog -ldl -lm -lc $(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/$(GCC_VERSION)/libs/$(ABI)/libgnustl_static.a -lgcc $(NDK_ROOT)/platforms/android-5/arch-arm/usr/lib/crtbegin_so.o

Hope it helps.