for how to structure the project. That talk says that gradle uses sane defaults with exported src and header files being in src & headers directories but this output doesn’t seem like its being setup properly.
I almost forgot, here is the build.gradle file that’s is outputting this
apply plugin: ‘c’
model {
components {
core_engine(NativeLibrarySpec) {
}
}
}
am i doing something wrong? I don’t seem to be setting something wrong.
The defaults are “src/${component.name}/${language}” and “src/${component.name}/headers”, so in your case it would be “src/core_engine/c” and “src/core_engine/headers”.
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
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.