I used some function pointer definition from a C library in a C++code context. When it gets translated, the build did not pass.
Check the failed message:
Build multiple targets stcrpc_armeabi-v7a ShotSync_armeabi-v7a
ninja: Entering directory `E:\work\projects\rpcjni\shotsync\.cxx\cmake\debug\armeabi-v7a'
[1/3] Building CXX object CMakeFiles/ShotSync.dir/ShotSync.cpp.o
FAILED: CMakeFiles/ShotSync.dir/ShotSync.cpp.o
D:\Android\AndroidSdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang++.exe --target=armv7-none-linux-androideabi19 --gcc-toolchain=D:/Android/AndroidSdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64 --sysroot=D:/Android/AndroidSdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot -DShotSync_EXPORTS -IE:/work/projects/rpcjni/shotsync/src/main/cpp/libstc-rpc/include -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables -fstack-protector-strong -no-canonical-prefixes -D_FORTIFY_SOURCE=2 -march=armv7-a -mthumb -Wformat -Werror=format-security -std=c++11 -O0 -fno-limit-debug-info -fPIC -MD -MT CMakeFiles/ShotSync.dir/ShotSync.cpp.o -MF CMakeFiles\ShotSync.dir\ShotSync.cpp.o.d -o CMakeFiles/ShotSync.dir/ShotSync.cpp.o -c E:/work/projects/rpcjni/shotsync/src/main/cpp/ShotSync.cpp
E:/work/projects/rpcjni/shotsync/src/main/cpp/ShotSync.cpp:1193:41: error: no viable conversion from 'JavaCPP_com_senter_shotsync_ShotSync_00024rpc_1handler_1t' to 'rpc_handler_t' (aka 'int (*)(rpc_request_hdr_t *, rpc_reply_t *)')
client::ClientSetMessageHandler(*ptr0);
^~~~~
E:/work/projects/rpcjni/shotsync/src/main/cpp/RpcImpl.h:11:48: note: passing argument to parameter 'userHandler' here
void ClientSetMessageHandler(rpc_handler_t userHandler);
^
1 error generated.
[2/3] Building CXX object CMakeFiles/ShotSync.dir/jnijavacpp.cpp.o
ninja: build stopped: subcommand failed.
Check this code and its repository for the scenario.
rpc_handler_t
And the mapper Java: NativeLibraryConfig.java
Any suggestions?
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4