Solutions to the problem of collect2: error: LD returned 1 exit status

I recently learned Cocos2D-X. I encountered a problem compiling C++.
Let’s start with my development environment:
Computer system: Ubuntu 15.04
Development tools: NDK_R10E + Eclipse + CDT + SDK

=
=
=
PS: I’m running build_native.py which builds C++ code

“Collect2: error: LD returned 1 exit status” made me wonder. After a few days of hard thinking and exploration, I made a small mistake: I didn’t add Gamecontroler.cpp to Android.mk.
So, the solution to the above error is to add Gamecontroller. CPP to the jni/ android.mk file.
PS: Add format can refer to Android.mk file.


Read More: