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.
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:
- A solution to [error] LD returned 1 exit status
- About the problem of collect2.exe [error] LD returned 1 exit status in dev!!!
- Solutions to the problem of “collect2.exe: error: LD returned 1” exit “status when writing C + + with vscode
- VBoxManage.exe: error: Resize hard disk operation for this format is not implemented yet!
- Error: failed to format “E:”; Diskpart errorlevel – 2147212243
- 21. Merge Two Sorted Lists [easy] (Python)
- Error: ~ /. Vuerc may be updated. Please delete it and re run vuercli in manual mode
- 26、Error:No resource identifier found for attribute ’roundIcon’ in package ‘android’
- ||Error: LD returned 1 exit status | C + + compile time problems
- Android Studio Error: Invoke-customs are only supported starting with Android O (–min-api 26)
- Php7 compiles collect2: error: LD returned 1 exit status
- [Linux] solve the error of decompressing JDK on Linux gzip: stdin: not in gzip format
- Windows 10 upgrade 1803 failed because of dual hard disk!!
- Android license status unknown solution
- Conversion to dalvik format failed with error 1 solution
- Command CompileSwift failed with a nonzero exit code
- collect2: error:ld returned 1 exit status solution
- Error parsing XML: error after document element
- In function `_start’ undefined reference to `main’ error: ld returned 1 exit status
- GoogleIO 2013 Android fast networking framework Volley introduction