Linker Error

Hi Guys,

I need your help with a Linker Error. I created a custom C++ class which is basically a JNI Bridge to Android and it builds ok in Xcode, I am not getting any error messages in XCode. But when I launch this project using the Unreal Editor, linker is throwing an error. I

I am using Macbook Sierra and UE ver 4.13.

Appreciate any help regarding this error.


Here are my error messages:
LogPlayLevel: CommandUtils.Run: Run: mono “/Users/Shared/UnrealEngine/4.13/Engine/Binaries/DotNET/UnrealBuildTool.exe” hazardnetworking Android Development -Project="/Users/d0d0/Documents/Projects/UnrealProjects/MyProjectName 4.13 - 6/MyProjectName.uproject" “/Users/d0d0/Documents/Projects/UnrealProjects/MyProjectName 4.13 - 6/MyProjectName.upro
ject” -remoteini="/Users/d0d0/Documents/Projects/UnrealProjects/MyProjectName 4.13 - 6" -noxge -nocreatestub -NoHotReload -ignorejunk
LogPlayLevel: UnrealBuildTool: Performing 1 actions (4 in parallel)
LogPlayLevel: UnrealBuildTool: [1/1] clang++
LogPlayLevel: UnrealBuildTool: /Users/d0d0/NVPACK/android-ndk-r10e/toolchains/aarch64-linux-android-4.9/prebuilt/darwin-x86_64/lib/gcc/aarch64-linux-android/4.9/…/…/…/…/aarch64-linux-android/bin/ internal error in read_cie, at /s/ndk-toolchain/src/build/…/binutils/binutils-2.25/gold/
LogPlayLevel: UnrealBuildTool: clang: error: linker command failed with exit code 1 (use -v to see invocation)
LogPlayLevel: UnrealBuildTool: ERROR: UBT ERROR: Failed to produce item: /Users/d0d0/Documents/Projects/UnrealProjects/MyProjectName 4.13 - 6/Binaries/Android/
LogPlayLevel: UnrealBuildTool: Total build time: 3.24 seconds

I am not sure whats going on…

Here is what I am going to do:

  1. I am going to play with the linker options in the UnrealEngine/Engine/Source/Programs/UnrealBuildTool/Android/AndroidToolChain.cs
  2. I am going to enable -v version
  3. I am going to try changing the linker from gold to bfd

My theory is that is causing this problem. I am going to figure out what it is, if I cant figure that out, I will change the linker to something else and see if it works.

Please please do let me know if I am not on the wrong path.


Try a newer toolchain. NDK 12b will work with 4.13. You can just install the NDK from Google’s download site and change the directory pointed to in Android SDK project settings in the editor.

Note: We are including a new version of CodeWorks for Android (customized 1R5) in 4.14 Engine/Extras/AndroidWorks.

Hi Chris,

I used Android’s tool chain and I was able to compile my UE4 C++ programs. I also tried using the latest version of Nvidia’s codeworks (1R5), I got some golang related errors. Looks like either Nvidia code works(1R5) or GoLang maynot be ready for MacOS Sierra yet.

Thanks Again for your help