Conrad Kramer
03/04/2022, 6:59 AMJoakim Forslund
03/04/2022, 7:05 AMConrad Kramer
03/04/2022, 7:27 AMlibcurl is not compiled as a part of the build, but rather the system libcurl is linked from KotlinJoakim Forslund
03/04/2022, 7:28 AMJoakim Forslund
03/04/2022, 7:29 AMConrad Kramer
03/04/2022, 7:30 AMYou need to have thelibrary binaries on your system to make the sample work.curl
Conrad Kramer
03/04/2022, 7:30 AMlibcurl as a part of the Gradle buildJoakim Forslund
03/04/2022, 7:30 AMJoakim Forslund
03/04/2022, 7:31 AMJoakim Forslund
03/04/2022, 7:31 AMJoakim Forslund
03/04/2022, 7:35 AMConrad Kramer
03/04/2022, 7:36 AMdef file, curl/curl.h is put into the headers field. If I have hello.c and hello.h , can I put a .c file into the headers field?Joakim Forslund
03/04/2022, 7:46 AMdef file would contain
package = hello
headers = hello.h
headerFilter = hello.h
---
One way is to put your .c code under the --- in the def fileJoakim Forslund
03/04/2022, 7:50 AM.c file intact, you simply pass the folder where the c files is located to compilerOptsConrad Kramer
03/04/2022, 8:07 AM---, but I am unable to get it to work any other wayConrad Kramer
03/04/2022, 8:08 AMCXError_ASTReadError if I put the .c file in the argumentsConrad Kramer
03/04/2022, 8:09 AMcpp-library plugin to do the compile, and then cinterop just for the headersConrad Kramer
03/04/2022, 8:11 AM.a) or b) link a system libraryJoakim Forslund
03/04/2022, 8:12 AM.c and the .h file in the same folder i.e nativeInterop/cinterop/c.
Keep the same def fileConrad Kramer
03/04/2022, 8:13 AM.c file in the headers arrayJoakim Forslund
03/04/2022, 8:14 AMJoakim Forslund
03/04/2022, 8:15 AMConrad Kramer
03/04/2022, 8:27 AMcinterop on Android, I assume I need to use androidNativeArm64 and not just android ?Joakim Forslund
03/04/2022, 8:29 AMConrad Kramer
03/04/2022, 10:30 PMstatic (they are from an external library), I either get “symbol multiply defined” if I include the c file or “symbol not found” if I do not