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:
- Solutions to the problem of “collect2.exe: error: LD returned 1” exit “status when writing C + + with vscode
- About the problem of collect2.exe [error] LD returned 1 exit status in dev!!!
- .. ld: symbol(s) not found for architecture x86_64 collect2: ld returned 1 exit status make[2]: ***
- collect2: error:ld returned 1 exit status solution
- Php7 compiles collect2: error: LD returned 1 exit status
- Collect2.exe: error: LD returned 5 exit status solution
- Collect2: error: LD returned 1 exit status
- undefined reference to `WinMain‘collect2.exe: error: ld returned 1 exit status
- Linux GCC compilation error: “collect2: LD returned 1 exit status”
- undefined reference to `pthread_create’ collect2: ld returned 1 exit status
- Error: LTO wrapper failed collect2: error: LD returned 1 exit status
- A solution to [error] LD returned 1 exit status
- Solution to dev C + + error [error] LD returned 1 exit status
- In function `_start’ undefined reference to `main’ error: ld returned 1 exit status
- Solution to error [error] LD returned 1 exit status in C language
- ||Error: LD returned 1 exit status | C + + compile time problems
- Error: LD returned 1 exit status appears when developing esp8266 with anxinco IDE
- Possible causes of [errror] ID returned 1 exit status error in dev C + + Programmer
- Java was started but returned exit code = 13 problem solving
- Python installation problem: error: Command erred out with exit status 1: