feat: add test.c

This commit is contained in:
2021-01-10 15:15:38 +08:00
parent dee3033007
commit 316ba7b338
3 changed files with 11 additions and 1 deletions

View File

@@ -7,7 +7,7 @@ edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[lib]
name = "dotalib"
name = "dota"
crate-type = ["staticlib"]
[dependencies]

View File

@@ -12,3 +12,8 @@ C
cbindgen --config cbindgen.toml --crate dotalib --lang c --output dotalib.h
```
Compile
```shell
cargo build
gcc -Ltarget/debug/ -ldota test.c
```

5
__misc/dotalib/test.c Normal file
View File

@@ -0,0 +1,5 @@
#include "dotalib.h"
int main(int argc, char** argv) {
print_hello_world();
}