Compile c files to separate directories. Add compressed library to example test project.

This commit is contained in:
Christoffer Lerno
2024-07-10 13:35:01 +02:00
parent 5cf1f13328
commit e7d8f64a49
8 changed files with 14 additions and 9 deletions

View File

@@ -2,6 +2,7 @@ module hello_world;
import std;
import bar;
import clib;
import clib2;
fn int test_doubler(int x) @if(env::WIN32) => x * x;
extern fn int test_doubler(int) @if(!env::WIN32);
@@ -14,5 +15,6 @@ fn int main()
printf("Hello double: %d\n", test_doubler(11));
if ($feature(ABCD)) io::printn("ABCD");
clib::hello_from_c();
clib2::hello_from_c_zip();
return 0;
}

View File

@@ -1,6 +1,6 @@
{
"provides" : "clib",
"c-sources" : ["hello.c"],
"c-sources" : ["hello2.c"],
"targets" : {
"macos-x64" : {
},

Binary file not shown.

View File

@@ -12,7 +12,7 @@
"./**"
],
"dependency-search-paths": [ "./lib" ],
"dependencies": ["clib"],
"dependencies": ["clib", "clib2"],
"features": ["ABCD"],