android / android/games-samples

debug|arm64-v8a : User is using a static STL but library requires a shared STL [//games-controller/paddleboat]

Open
#21 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
307
Forks
138
Avg merge
8d 11h
Merged PRs (30d)
2

Description

below my cmake stuff, tried to use STATIC instead of SHARED but doesn't help..
what is going on exactly and how to fix it ?
--------------------------------------------------------------------------------------------

# For more information about using CMake with Android Studio, read the
# documentation: https://d.android.com/studio/projects/add-native-code.html

# Sets the minimum version of CMake required to build the native library.

cmake_minimum_required(VERSION 3.18.1)

# Declares and names the project.

project("theeyeoftyphoon")

# Creates and names a library, sets it as either STATIC
# or SHARED, and provides the relative paths to its source code.
# You can define multiple libraries, and CMake builds them for you.
# Gradle automatically packages shared libraries with your APK.

add_library( # Sets the name of the library.
theeyeoftyphoon

# Sets the library as a shared library.
SHARED

# Provides a relative path to your source file(s).
stub.cpp

../../../../../logoPC.c
../../../../../emptyPC.c
../../../../../titlePC.c
../../../../../introPC.c
../../../../../thronePC.c
../../../../../templePC.c
../../../../../selectionPC.c
../../../../../disclaimerPC.c
../../../../../arnoldPC.c
../../../../../eyebackgroundPC.c
../../../../../teotPC.c
../../../../../level01PC.c
../../../../../level02PC.c
../../../../../level03PC.c
../../../../../level04PC.c
../../../../../level05PC.c
../../../../../level06PC.c
../../../../../level07PC.c
../../../../../level08PC.c
../../../../../level09PC.c
../../../../../level10PC.c
../../../../../level11PC.c
../../../../../level12PC.c
../../../../../level13PC.c
../../../../../level14PC.c
../../../../../level15PC.c
../../../../../entityDamage.c
../../../../../hoyaAction.c
../../../../../hoyaComport.c
../../../../../royComport.c
../../../../../nelsonComport.c
../../../../../natashaComport.c
../../../../../musasiComport.c
../../../../../chohongComport.c
../../../../../dalmaComport.c
../../../../../jarkillComport.c
../../../../../kimhoonComport.c
../../../../../muiComport.c
../../../../../sauriComport.c
../../../../../tlalocComport.c
../../../../../wangchangComport.c
../../../../../powellComport.c
../../../../../mahesvaraComport.c
../../../../../hoyaComportPC.c
../../../../../royComportPC.c
../../../../../nelsonComportPC.c
../../../../../natashaComportPC.c
../../../../../musasiComportPC.c
../../../../../chohongComportPC.c
../../../../../dalmaComportPC.c
../../../../../jarkillComportPC.c
../../../../../kimhoonComportPC.c
../../../../../sauriComportPC.c
../../../../../tlalocComportPC.c
../../../../../wangchangComportPC.c
../../../../../powellComportPC.c
../../../../../mahesvaraComportPC.c
../../../../../hoyaShadowOffset.c
../../../../../royShadowOffset.c
../../../../../nelsonShadowOffset.c
../../../../../natashaShadowOffset.c
../../../../../musasiShadowOffset.c
../../../../../chohongShadowOffset.c
../../../../../dalmaShadowOffset.c
../../../../../jarkillShadowOffset.c
../../../../../kimhoonShadowOffset.c
../../../../../muiShadowOffset.c
../../../../../sauriShadowOffset.c
../../../../../tlalocShadowOffset.c
../../../../../wangchangShadowOffset.c
../../../../../powellShadowOffset.c
../../../../../mahesvaraoneShadowOffset.c
../../../../../hoyaAnimOptim.c
../../../../../hoyaParamsPC.c
../../../../../royParamsPC.c
../../../../../nelsonParamsPC.c
../../../../../natashaParamsPC.c
../../../../../musasiParamsPC.c
../../../../../chohongParamsPC.c
../../../../../dalmaParamsPC.c
../../../../../jarkillParamsPC.c
../../../../../kimhoonParamsPC.c
../../../../../muiParamsPC.c
../../../../../sauriParamsPC.c
../../../../../tlalocParamsPC.c
../../../../../wangchangParamsPC.c
../../../../../powellParamsPC.c
../../../../../mahesvaraParamsPC.c
../../../../../pigParamsPC.c
../../../../../game.c
../../../../../entities.c
../../../../../menus.c
../../../../../controllers.c
../../../../../actions.c
../../../../../physic.c
../../../../../reManager.c
../../../../../androidFramework.c
../../../../../../../SDK/2D/Src/primitives.c
../../../../../../../SDK/Crc32/Src/Crc32.cpp
../../../../../../../SDK/FileSystem/Common/FileSystemInit.c
../../../../../../../SDK/FileSystem/Common/IoResource.c
../../../../../../../SDK/FileSystem/Common/PackResource.c
../../../../../../../SDK/FileSystem/Common/Resource.c
../../../../../../../SDK/FileSystem/Common/Sort.c
../../../../../../../SDK/FileSystem/Common/resdata.c
../../../../../../../SDK/FileSystem/Android/fileAndroid.c
../../../../../../../SDK/FileSystem/Android/fileSystem.c
../../../../../../../SDK/FileSystem/Android/tools.c
../../../../../../../SDK/Lzo64/minilzo.c
../../../../../../../SDK/Picture/Src/TinyJpeg/tinyjidctflt.c
../../../../../../../SDK/Picture/Src/TinyJpeg/tinyjpeg.c
../../../../../../../SDK/Picture/Src/Pvrtc/PVRTDecompress.c
../../../../../../../SDK/VrAlloc/VrAlloc.c
../../../../../../../SDK/VrAlloc/Std/StdAlloc.c
../../../../../../../SDK/Keyboard/Src/Keyboard.c
../../../../../../../SDK/Glfw/lib/Android/android_enable.c
../../../../../../../SDK/Glfw/lib/Android/android_fullscreen.c
../../../../../../../SDK/Glfw/lib/Android/android_glext.c
../../../../../../../SDK/Glfw/lib/Android/android_init.c
../../../../../../../SDK/Glfw/lib/Android/android_joystick.c
../../../../../../../SDK/Glfw/lib/Android/android_thread.c
../../../../../../../SDK/Glfw/lib/Android/android_time.c
../../../../../../../SDK/Glfw/lib/Android/android_window.c
../../../../../../../SDK/Glfw/lib/enable.c
../../../../../../../SDK/Glfw/lib/fullscreen.c
../../../../../../../SDK/Glfw/lib/init.c
../../../../../../../SDK/Glfw/lib/glext.c
../../../../../../../SDK/Glfw/lib/input.c
../../../../../../../SDK/Glfw/lib/joystick.c
../../../../../../../SDK/Glfw/lib/thread.c
../../../../../../../SDK/Glfw/lib/time.c
../../../../../../../SDK/Glfw/lib/window.c
../../../../../../../SDK/MikWin/drivers/drv_nos.c
../../../../../../../SDK/MikWin/drivers/drv_android.c
../../../../../../../SDK/MikWin/loaders/load_669.c
../../../../../../../SDK/MikWin/loaders/load_amf.c
../../../../../../../SDK/MikWin/loaders/load_dsm.c
../../../../../../../SDK/MikWin/loaders/load_far.c
../../../../../../../SDK/MikWin/loaders/load_gdm.c
../../../../../../../SDK/MikWin/loaders/load_imf.c
../../../../../../../SDK/MikWin/loaders/load_it.c
../../../../../../../SDK/MikWin/loaders/load_m15.c
../../../../../../../SDK/MikWin/loaders/load_med.c
../../../../../../../SDK/MikWin/loaders/load_mod.c
../../../../../../../SDK/MikWin/loaders/load_mtm.c
../../../../../../../SDK/MikWin/loaders/load_okt.c
../../../../../../../SDK/MikWin/loaders/load_s3m.c
../../../../../../../SDK/MikWin/loaders/load_stm.c
../../../../../../../SDK/MikWin/loaders/load_stx.c
../../../../../../../SDK/MikWin/loaders/load_ult.c
../../../../../../../SDK/MikWin/loaders/load_uni.c
../../../../../../../SDK/MikWin/loaders/load_xm.c
../../../../../../../SDK/MikWin/mmio/mmalloc.c
../../../../../../../SDK/MikWin/mmio/mmerror.c
../../../../../../../SDK/MikWin/mmio/mmmem.c
../../../../../../../SDK/MikWin/mmio/mmio.c
../../../../../../../SDK/MikWin/playercode/mdreg.c
../../../../../../../SDK/MikWin/playercode/mdriver.c
../../../../../../../SDK/MikWin/playercode/imaAdpcm.c
../../../../../../../SDK/MikWin/playercode/mdulaw.c
../../../../../../../SDK/MikWin/playercode/mloader.c
../../../../../../../SDK/MikWin/playercode/mlreg.c
../../../../../../../SDK/MikWin/playercode/mlutil.c
../../../../../../../SDK/MikWin/playercode/mplayer.c
../../../../../../../SDK/MikWin/playercode/munitrk.c
../../../../../../../SDK/MikWin/playercode/mwav.c
../../../../../../../SDK/MikWin/playercode/msample.c
../../../../../../../SDK/MikWin/playercode/npertab.c
../../../../../../../SDK/MikWin/playercode/sloader.c
../../../../../../../SDK/MikWin/playercode/virtch.c
../../../../../../../SDK/MikWin/playercode/virtch2.c
../../../../../../../SDK/MikWin/playercode/virtch_common.c
../../../../../../../SDK/MikWin/src/x11/cdplayer.c
../../../../../../../SDK/MikWin/src/mikwin.c
../../../../../../../SDK/SysInfos/Src/Android/CpuidAndroid.c
../../../../../../../SDK/SysInfos/Src/Interface.c
../../../../../../../SDK/SysInfos/Src/Android/SpeedAndroid.c
../../../../../../../SDK/SysInfos/Src/Android/systemAndroid.c

../../../../../../../SDK/reTro/DREAMCAST/reScreen.cpp
../../../../../../../SDK/reTro/DREAMCAST/reSprite.cpp
../../../../../../../SDK/reTro/DREAMCAST/reMap.cpp
../../../../../../../SDK/reTro/DREAMCAST/reSfx.cpp
../../../../../../../SDK/reTro/DREAMCAST/reInput.cpp
../../../../../../../SDK/reTro/reCollisions.c
../../../../../../../SDK/Rasteriser/OES/Src/Clip.cpp
../../../../../../../SDK/Rasteriser/OES/Src/Lights.cpp
../../../../../../../SDK/Rasteriser/OES/Src/Manage.cpp
../../../../../../../SDK/Rasteriser/OES/Src/Modes.cpp
../../../../../../../SDK/Rasteriser/OES/Src/Prim.cpp
../../../../../../../SDK/Rasteriser/OES/Src/Oes.cpp
../../../../../../../SDK/Rasteriser/OES/Src/Shadows.cpp
../../../../../../../SDK/Rasteriser/OES/Src/Textures.cpp
../../../../../../../SDK/GlWrapper/Src/wrapper.cpp
../../../../../../../SDK/VrMath/Drivers/VrMathRef/Src/MathRef.cpp
../../../../../../../SDK/Picture/Src/BitmapFile.cpp
../../../../../../../SDK/Picture/Src/Remapp.cpp
../../../../../../../SDK/Picture/Src/Targa/Tga.cpp
../../../../../../../SDK/Picture/Src/Pcx/Pcx.cpp
../../../../../../../SDK/Picture/Src/Gif/Gif.cpp
../../../../../../../SDK/Picture/Src/Bmp/bmp.cpp
../../../../../../../SDK/Picture/Src/Sp3/Sp3.cpp
../../../../../../../SDK/Picture/Src/TinyJpeg/loadjpeg.cpp
../../../../../../../SDK/Picture/Src/Xpr/Xpr.cpp
../../../../../../../SDK/Picture/Src/Pvrtc/Pvrtc.cpp
../../../../../../../SDK/Picture/Src/Ktx/Ktx.cpp
../../../../../../../SDK/Picture/Src/Dds/Dds.cpp
../../../../../../../SDK/Picture/Src/Dds/txc_compress_dxtn.cpp
../../../../../../../SDK/Input/Src/InputKernel.cpp
../../../../../../../SDK/Input/InputJoyGlfw/Src/InitJoyGlfw.cpp
../../../../../../../SDK/Input/InputJoyGlfw/Src/JoyGlfw.cpp
../../../../../../../SDK/Input/InputKeybGlfw/Src/InitKeybGlfw.cpp
../../../../../../../SDK/Input/InputKeybGlfw/Src/KeybGlfw.cpp
../../../../../../../SDK/Input/InputMouse32/Src/inputmouse32.cpp
../../../../../../../SDK/Input/InputMultiTouch/inputMultiTouch.cpp
../../../../../../../SDK/Synchro/Src/Synchro.cpp

Renderer.cpp)

include_directories(
p:/Code/SDK/Inc
p:/Code/SDK/Glfw/lib
P:/Code/SDK/Glfw/lib/Android
p:/Code/SDK/FileSystem/Common
P:/Code/SDK/FileSystem/Android
p:/Code/SDK/MikWin/include
p:/Code/SDK/Lzo64/include
p:/Code/SDK/include)

# Searches for a specified prebuilt library and stores the path as a
# variable. Because CMake includes system libraries in the search path by
# default, you only need to specify the name of the public NDK library
# you want to add. CMake verifies that the library exists before
# completing its build.

find_library( # Sets the name of the path variable.
log-lib

# Specifies the name of the NDK library that
# you want CMake to locate.
log)

# Searches for a package provided by the game activity dependency

find_package(game-activity REQUIRED CONFIG)
find_package(games-controller REQUIRED CONFIG)

# Specifies libraries CMake should link to your target library. You
# can link multiple libraries, such as libraries you define in this
# build script, prebuilt third-party libraries, or system libraries.

target_link_libraries( # Specifies the target library.
theeyeoftyphoon

android

# The game activity
game-activity::game-activity
games-controller::paddleboat_static

# EGL, required for configuring the display context
EGL

# GL ES 3, used for the sample renderer
GLESv1_CM

# for AImageDecoder, to load images from resources
#jnigraphics

# sound
OpenSLES

# Links the target library to the log library
# included in the NDK.
${log-lib})

Contributor guide

Open the contributing guide

Research direction

Start with the pasted CMake configuration and the Android Studio native-code documentation linked in the issue, then reproduce the debug arm64-v8a build. Determine which STL setting produces the static-versus-shared error and document the configuration change that makes the build succeed.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, cmake, cpp
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.