HI team : i am facing an issue on export a C static library from Go via GCCGO compiler on IBM-AIX -PPC(unix) box. my GO code(wrapper.go) as below :
package main //#include <stdio.h> //#include <stdlib.h> import "C" import "fmt" //export printHello func printHello() { fmt.Println("hello nuts!") } func main() { // for c build } the command i used to compile it is : go build -compiler gccgo -buildmode=c-archive -o caculator.a -gccgoflags '-lgo -static' wrapper.go then i got a c static library caculator.a , then i use it in a c program as below : #include <stdio.h> #include <stdint.h> #include "caculator.h" int main() { int a=12; int b=13; printf("Hello, let's test caculator!"); printHello(); printf("result:%d",12131231); } then i tried compile this c program with : gcc -o app main.c caculator.a -pthread then i got a exec file app .... but when i tried to run it , it seems run into a deadlock , nothing print out the solution works great on a 86_64 linux box with Go C compiler (non-GCCGO)... got stuck with this issue above one week , any thought on this ? thanks -- 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 golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.