Setting up Android Openframeworks in Windows7

I have followed all the instructions mentioned in the following link:

http://www.multigesture.net/articles/how-to-setup-openframeworks-for-android-on-windows/

To setup the Openframeworks for android in windows environment. While building the openFrameworks. I get the following error. Tried everything possible to work with but still not getting it correct. Mentioned the error as follows, please help me out. Thank you in advance.

Build of configuration Android for project openFrameworks **

make android -C…/openFrameworksCompiled/project/android /bin/sh: pkg-config: command not found /bin/sh: pkg-config: command not found FIND: Parameter format not correct File not found - *.cpp make: Entering directory /c/Development/OF/libs/openFrameworksCompiled/project/android’ make DebugAndroid FIND: Parameter format not correct File not found - *.cpp FIND: Parameter format not correct File not found - *.cpp make[1]: Entering directory/c/Development/OF/libs/openFrameworksCompiled/project/android’ make[1]: Nothing to be done for DebugAndroid’. make[1]: Leaving directory/c/Development/OF/libs/openFrameworksCompiled/project/android’ make ReleaseAndroid FIND: Parameter format not correct File not found - *.cpp FIND: Parameter format not correct File not found - *.cpp make[1]: Entering directory /c/Development/OF/libs/openFrameworksCompiled/project/android’ make[1]: Nothing to be done forReleaseAndroid’. make[1]: Leaving directory /c/Development/OF/libs/openFrameworksCompiled/project/android’ make Release_arm7Android FIND: Parameter format not correct File not found - *.cpp FIND: Parameter format not correct File not found - *.cpp make[1]: Entering directory/c/Development/OF/libs/openFrameworksCompiled/project/android’ make[1]: Nothing to be done for Release_arm7Android’. make[1]: Leaving directory/c/Development/OF/libs/openFrameworksCompiled/project/android’ make Release_neonAndroid FIND: Parameter format not correct File not found - *.cpp FIND: Parameter format not correct File not found - *.cpp make[1]: Entering directory /c/Development/OF/libs/openFrameworksCompiled/project/android’ make[1]: Nothing to be done forRelease_neonAndroid’. make[1]: Leaving directory /c/Development/OF/libs/openFrameworksCompiled/project/android’ make: Leaving directory/c/Development/OF/libs/openFrameworksCompiled/project/android’

Build Finished **

hello, hello -
did you ever figure out how to solve the issue?

I am also following http://www.multigesture.net/articles/how-to-setup-openframeworks-for-android-on-windows/ and ran into almost the same problem (i just have an additional POSIX error on top)

[pre]19:50:02 **** Build of configuration Android for project openFrameworks ****
make -C …/openFrameworksCompiled/project/android -j4 -j8 android
cygwin warning:
MS-DOS style path detected: C:\Users\eva\Documents\OF\of_develop_dec2012\libs\openFrameworks
Preferred POSIX equivalent is: /cygdrive/c/Users/eva/Documents/OF/of_develop_dec2012/libs/openFrameworks
CYGWIN environment variable option “nodosfilewarning” turns off this warning.
Consult the user’s guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
FIND: Parameter format not correct
File not found - *.cpp
make: Entering directory /cygdrive/c/Users/eva/Documents/OF/of\_develop\_dec2012/libs/openFrameworksCompiled/project/android' /usr/bin/make DebugAndroid FIND: Parameter format not correct File not found - \*.cpp FIND: Parameter format not correct File not found - \*.cpp FIND: Parameter format not correct File not found - \*.cpp make[1]: Entering directory/cygdrive/c/Users/eva/Documents/OF/of_develop_dec2012/libs/openFrameworksCompiled/project/android’
echo "creating " …/…/lib/android/armeabi/libopenFrameworksDebug.a
creating …/…/lib/android/armeabi/libopenFrameworksDebug.a
mkdir -p …/…/lib/android/armeabi
C:/Development/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ar -r “…/…/lib/android/armeabi/libopenFrameworksDebug.a”
/bin/sh: C:/Development/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ar: No such file or directory
make[1]: Leaving directory /cygdrive/c/Users/eva/Documents/OF/of\_develop\_dec2012/libs/openFrameworksCompiled/project/android' make[1]: \*\*\* [../../lib/android/armeabi/libopenFrameworksDebug.a] Error 127 make: Leaving directory/cygdrive/c/Users/eva/Documents/OF/of_develop_dec2012/libs/openFrameworksCompiled/project/android’
make: *** [android] Error 2

19:50:06 Build Finished (took 4s.165ms)[/pre]

After dissecting the error code i noticed that it assumes my computer runs Linux. Not sure why.
[pre]

make[1]: Entering directory /cygdrive/c/Users/eva/Documents/OF/of\_develop\_dec2012/libs/openFrameworksCompiled/project/android' echo "creating " ../../lib/android/armeabi/libopenFrameworksDebug.a creating ../../lib/android/armeabi/libopenFrameworksDebug.a mkdir -p ../../lib/android/armeabi C:/Development/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/[glow=red,2,300]linux-x86[/glow]/bin/arm-linux-androideabi-ar -r "../../lib/android/armeabi/libopenFrameworksDebug.a" /bin/sh: C:/Development/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/[glow=red,2,300]linux-x86[/glow]/bin/arm-linux-androideabi-ar: No such file or directory make[1]: Leaving directory/cygdrive/c/Users/eva/Documents/OF/of_develop_dec2012/libs/openFrameworksCompiled/project/android’
make[1]: *** […/…/lib/android/armeabi/libopenFrameworksDebug.a] Error 127
make: Leaving directory `/cygdrive/c/Users/eva/Documents/OF/of_develop_dec2012/libs/openFrameworksCompiled/project/android’
make: *** [android] Error 2
[/pre]
I edited the makefile (/libs/openFrameworksCompiled/project/android/makefile) to force ‘windows’ as the HOST_PLATFORM:
[pre]
ifeq ($(findstring Android,$(MAKECMDGOALS)),Android)
ifeq ($(wildcard paths.make),)
$(error Android paths.make file does not exist. Create it from paths.make.default)
else
include paths.make
endif
ARCH = android
ifeq ($(shell uname),Darwin)
HOST_PLATFORM = darwin-x86
else ifeq ($(shell uname),MINGW32_NT-6.1)
HOST_PLATFORM = windows
else
[glow=yellow,2,300]HOST_PLATFORM = windows[/glow]
endif
endif
[/pre]

Then i was able to build ‘openFrameworks’

well, you seem to be running it on cygwin, so I guess that’s where it picks up Linux. have you tried using msys/mingw?

I’ve been trying to figure out how to change the compiler in eclipse. I have mingw installed, in the correct location and in the PATH etc. If i create a new project within eclipse, i can select mingw as the compiler for that. But i don’t know where to set it for the ‘existing project’ import of the android-openframeworks project. All the tips i find online, tell me to set it in preferences-tabs that i don’t seem to have. (like preferences > c/c++ > compiler)

Windows 7 + Eclipse 4.2

in a current eclipse version, i have these in the project properties - C/C++ Build in a handful of submenus.
I was less concerned about the kind of compiler, but about the presence of Cygwin which maybe messes this all up. see e.g. your strange paths like “/cygdrive/c/Users/eva”. now I haven’t used OF on windows in a while, but does that really look like that normally, I can’t recollect paths like that.

Alright, my first post can be super helpful - that’s fantastic. You can thank my incessant desire to create generative visuals for the struggle I went through to figure these things out… :slight_smile: Maybe they can go in the sticky or something as it seems these problems aren’t well documented on the web?

Anyway, here we go:

FIND: Parameter format not correct File not found - *.cpp

This is output from the Windows find.exe binary, as opposed to the one in MSYS\bin directory. Fix this by placing the MSYS\bin directory path at the beginning of your PATH environment variable.

hello, hello -
did you ever figure out how to solve the issue?

I am also following http://www.multigesture.net/articles/how-to-setup-openframeworks-for-android-on-windows/ and ran into almost the same problem (i just have an additional POSIX error on top)

19:50:02 **** Build of configuration Android for project openFrameworks ****
make -C …/openFrameworksCompiled/project/android -j4 -j8 android
cygwin warning:
MS-DOS style path detected: C:\Users\eva\Documents\OF\of_develop_dec2012\libs\openFrameworks

I’m guessing that you filled in the paths.make file as C:\Users\eva… instead of C:/Users/eva… - if not, I’m not sure what’s going on there. I would try to figure out where the path style message is coming from and work backwards from there.

After dissecting the error code i noticed that it assumes my computer runs Linux. Not sure why.


make[1]: Entering directory `/cygdrive/c/Users/eva/Documents/OF/of_develop_dec2012/libs/openFrameworksCompiled/project/android’
echo "creating " …/…/lib/android/armeabi/libopenFrameworksDebug.a
creating …/…/lib/android/armeabi/libopenFrameworksDebug.a
mkdir -p …/…/lib/android/armeabi
C:/Development/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86/bin/arm-linux-androideabi-ar -r “…/…/lib/android/armeabi/libopenFrameworksDebug.a”

I just spent two hours tracking this down. If you recently downloaded MinGW then you likely have version 6.1 - that will cause a problem inside the openFrameworksCompiled\project\android\makefile (lines 15-29 below) when your host platform is determined:

  
ifeq ($(findstring Android,$(MAKECMDGOALS)),Android)  
	ifeq ($(wildcard paths.make),)  
    $(error Android paths.make file does not exist. Create it from paths.make.default)  
	else  
		include paths.make  
	endif  
	ARCH = android  
	ifeq ($(shell uname),Darwin)  
		HOST_PLATFORM = darwin-x86  
	else ifeq ($(shell uname),MINGW32_NT-6.1)  
		HOST_PLATFORM = windows  
	else  
		HOST_PLATFORM = linux-x86  
	endif  
endif  

Changing MINGW32_NT-6.1 to MINGW32_NT-6.2 and building the openFrameworks project again was successful after all of these changes. Phew! Happy creating. :slight_smile:

To save you more trouble, also make the MINGW change to 6.2 in the following common makefile for all the example projects:

openFrameworks\libs\openFrameworksCompiled\project\makefileCommon\Makefile.examples

Otherwise, you’ll see the same linux-x86 stuff in the build console. In fact, after a little digging around I replaced that line with the following to only search for the application name:

  
  
ifeq ($(findstring Android,$(MAKECMDGOALS)),Android)  
	include $(OF_ROOT)/libs/openFrameworksCompiled/project/android/paths.make  
	ARCH = android  
	ifeq ($(shell uname),Darwin)  
		HOST_PLATFORM = darwin-x86  
	### else ifeq (,MINGW32_NT-6.2) ### OLD  
	else ifneq (,$(findstring MINGW32_NT,$(shell uname))) ### NEW  
		HOST_PLATFORM = windows  
	else  
		HOST_PLATFORM = linux-x86  
	endif  
endif  
  

That seems to work for the host platform, but something else is blowing up on me in the second half. Back shortly… :wink:

Amazing. Your’e my new hero! :slight_smile:

Will get back to this on the weekend.
In case you haven’t solved all problems by then, maybe i can be of help too.

Some errors along the way:

[hr]

[pre]cygwin warning: MS-DOS style path detected[/pre]
I have cygwin and mingw installed, and was having a hard time telling eclipse to use mingw for the openframeworks compile. Putting the mingw/msys references first in the PATH environment variable (in windows system properties, plus restart), didn’t seem to change that. Whenever i looked at project>properties>c/c++build> environment within eclipse, it still listed cygwin first in the PATH variable there. So i simply deleted cygwin out of that variable (in project properties). Then the cygwin warnings stopped.

[hr]

[pre]bash.exe: warning: could not find /tmp, please create![/pre]
I created a C:/tmp folder. Changed the TEMP and TMP environment variables to point to the folder. Restarted. No change. Then i added TEMP and TMP as variables to project>properties>c/c++build>enviroment. see http://grab.by/i8HG. That worked.

Sidenote: obviously these fixes are terrible, as they are set in the project properties only, instead of globally.

[hr]

[pre]/bin/sh: pkg-config: command not found[/pre]
Followed these instructions http://www.gaia-gis.it/spatialite-3.0.0-BETA/mingw-how-to.html#pkg-config to install pkg-config.

[hr]

[pre]…/…/…/openFrameworks/app/ofAppGlutWindow.cpp:12:22: fatal error: GL/glut.h: No such file or directory[/pre]
Next error …

activeknowledge: thanks for digging and finding those fixes. pull requests/improvements to the documentation are always welcome at https://github.com/openframeworks/ofSite . the android setup guid is here: https://github.com/openframeworks/ofSite/blob/master/setup/android-eclipse/index.html.mako
(if you can’t do that, please at least file an issue so the doc maintainers know about the problem)

I’ll file an issue separately on the OF library bug tracker about the faulty mingw recognition, great catch!

evsc: I’m sorry that you have such a bad experience running OF on windows. normally it works better, but sadly we lack maintainer manpower on windows to keep the whole process in shape. :frowning: