I apologize for bringing this issue back up but I restructured my code a little bit to fit in with the default gradle folder structure and tried to build a shared library but the build directory comes out empty.
Here are some screenshots of my process
This is the first screenshot showing the directory layout and the source files
this is the components view from gradle
this is the tasks view from gradle
This is me running the build command which turns out successful
This is the tree view after running the build shared library command, the folder is empty
I don’t have an executable atm since I am working on these components and will add an executable later.
Just a quick edit:
I am able to use gcc to compile the shared library like this:
bash-3.2$ gcc -shared -I/Users/blubee/SDL/bluengine/source/core_engine/headers/core_engin
e.h -lSDL2 -o ce src/c/core_engine.c
so by manually adding the linker args to gcc I can build. I tried editing my build.gradle to add -lSDL2 to the binaries.all but that’s still giving me a empty build directory with a successful build.
Here’s is the text of my build.gradle
apply plugin: ‘c’
model {
components {
core_engine(NativeLibrarySpec) {
binaries.all {
cCompiler.args “-lSDL2”
}
}
}
}