From f6d6126fc96ecf4a7f7d22da330df9506293b0d0 Mon Sep 17 00:00:00 2001 From: Qingyou Meng Date: Sat, 26 Feb 2022 01:21:21 +0800 Subject: [PATCH] ffi: explicitly declare hello_from_rust for C99 (#343) --- src/ffi.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ffi.md b/src/ffi.md index 9e02eee..45a1f61 100644 --- a/src/ffi.md +++ b/src/ffi.md @@ -281,6 +281,8 @@ We'll create a C file to call the `hello_from_rust` function and compile it by ` C file should look like: ```c +extern void hello_from_rust(); + int main(void) { hello_from_rust(); return 0;