Open
Description
Hi all,
I am trying to compile a simple Hello World Script.
#include <stdio.h>
char * c_hello() {
return "Hello World";
}
I can compile it fine using mbebenita..io/WasmExplorer but when I try to compile it using the following command
./node_modules/.bin/wa compile -o HelloWorld.wasm HelloWorld.c
I get the following error
$> ./node_modules/.bin/wa compile -o HelloWorld.wasm HelloWorld.c
Compiling on darwin-x64 ...
clang HelloWorld.c
-c
--target=wasm32-unknown-unknown
-emit-llvm
-nostdinc
-nostdlib
-D WEBASSEMBLY
-isystem /Users/anthonybudd/Development/WebAssembly_HelloWorld/node_modules/webassembly/include
-o /var/folders/vl/3fkjykn52zdb88cv3flv75zr0000gn/T/wa1_7474HSLCSC30dn9g.tmp
HelloWorld.c:1:10: fatal error: 'stdio.h' file not found
#include <stdio.h>
^~~~~~~~~
1 error generated.
FAILED Error: code 1
at ChildProcess.<anonymous> (/Users/anthonybudd/Development/WebAssembly_HelloWorld/node_modules/webassembly/cli/util.js:38:24)
at ChildProcess.emit (events.js:200:13)
at maybeClose (internal/child_process.js:1021:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:283:5)
FYI I know absolutely nothing about C. So apologies if this is a stupid question.
Metadata
Metadata
Assignees
Labels
No labels