Hi, I have the following program
package main
/*
#include <stdio.h>
static void SayHello(const char* s) {
puts(s);
}
*/
import "C"
func main() {
C.SayHello(C.CString("Hello, World\n"))
}
I want to compile this program to LLVM IR with gollvm, the compilation
instruction is as follows:
llvm-goc -emit-llvm -c -O0 goc.go -o goc.bc
The errors are as follows:
goc.go:10:9: error: import file 'C' not found
goc.go:13:5: error: reference to undefined name 'C'
goc.go:13:16: error: reference to undefined name 'C'
What's wrong with my compilation instruction? How could I compile this
program to LLVM IR?
I would appreciate it if someone could help me.
Thank you!
--
You received this message because you are subscribed to the Google Groups
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/golang-nuts/614dface-3e06-4050-8ea2-bf1ffd0c5349n%40googlegroups.com.