openframeworks/openFrameworks — pull request #1499 by falcon4ever (2012-08-21 18:54:37+00:00)
Title: Develop fix r8b mingw

This is an update ( https://github.com/openframeworks/openFrameworks/pull/1484 ) since the merge (https://github.com/openframeworks/openFrameworks/commit/208f3bc46c14586926569d0e14aacbaee2378b6e) broke the windows compatibility.

1. Updated the OF libs makefile
- Added the missing if statement for mingw
- Changed the compiler to use 4.6 since the examples are build using 4.6 as well

2. Reverted the "-fuse-ld=gold" hack
This hack causes the examples not to build on windows. As stated in the NDK release docs its only for Mac/Linux:

( http://developer.android.com/tools/sdk/ndk/index.html )
Support for the gold linker is only available for ARM and x86 architectures on Linux and Mac OS hosts. This support is disabled by default. Add LOCAL_LDLIBS += -fuse-ld=gold in Android.mk to enable it.

Since a fix will be released in the next NDK (see the reply of this google engineer -> http://code.google.com/p/android/issues/detail?id=35209#c14 ) I would suggest putting "-fuse-ld=gold" in a temporary if statement so it will only append it to LDFLAGS if you're building on the Mac/Linux platform.

For example like:
ifneq ($(shell uname),MINGW32_NT-6.1)
LDFLAGS += -fuse-ld=gold
endif