Tristan
03/02/2022, 12:56 AMTristan
03/02/2022, 1:26 AMclang -c main.c
to generate the .o
file).
I have no idea what I am talking about 😅Big Chungus
03/02/2022, 8:27 AMBig Chungus
03/02/2022, 8:28 AMmsink
03/02/2022, 10:19 AMTristan
03/02/2022, 4:07 PMTristan
03/04/2022, 2:46 AMlinkNative
I get an error saying
ld: symbol(s) not found for architecture x86_64
But I don’t want it to try to include it.
Currently in Gradle I have something like this
macosX64("native") {
compilations.getByName("main") {
cinterops {
val lib by creating {
defFile(project.file("src/nativeInterop/cinterop/lib/lib.def"))
compilerOpts("-Isrc/nativeInterop/cinterop/lib")
includeDirs.allHeaders("src/nativeInterop/cinterop/lib")
}
}
}
binaries {
sharedLib {
baseName = "MyLibrary"
}
}
}
What should I be doing that I am missing?msink
03/04/2022, 4:38 AMlinkerOpts.linux
, linkerOpts.osx
Tristan
03/04/2022, 4:57 PMclang -c main.c
Then when I want the bin
clang main.o lib.dylib
Tristan
03/07/2022, 8:13 PMbinaries {
sharedLib {
baseName = "MyLibrary"
linkerOpts("-Wl,-U,_add42")
}
}
Then I was able to run
clang main.o lib.o libMyLibrary.dylib
Ivan Cagle (IvanEOD)
08/09/2023, 2:22 PM