Areg Abgaryan
Areg Abgaryan

Reputation: 11

Build fail with "undefined reference to"

Can't build Android C++ projects with OpenCV (static library) on Visual Studio clang.exe. Here's the build output.

1>------ Build started: Project: AndroidTry.NativeActivity, Configuration: Debug x86 ------
1>ANDROID_HOME=C:\ProgramData\Microsoft\AndroidSDK\25
1>ANT_HOME=C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Apps\apache-ant-1.9.3
1>JAVA_HOME=C:\Program Files\Android\jdk\microsoft_dist_openjdk_1.8.0.25
1>NDK_ROOT=C:\\Microsoft\AndroidNDK64\android-ndk-r15c
1> undefined reference to 'show_picture()'
1>clang.exe: error: linker command failed with exit code 1
1>C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\IDE\VC\VCTargets\Application 
Type\Android\3.0\Android.Common.targets(104,5): error MSB6006: "clang.exe" exited with code 1.
1>Done building project "AndroidTry.NativeActivity.vcxproj" -- FAILED. 

Upvotes: 1

Views: 24

Answers (0)

Related Questions