Commit 272f285b authored by Antoine Martin's avatar Antoine Martin Committed by Antoine Martin

boilerplate: fix linking on Linux

parent 686ed487
Pipeline #13219 passed with stage
in 38 seconds
......@@ -13,11 +13,11 @@ endif
all: main.dve2C
main.a: main.go {{.PackagePath}}
go build -o $@ -buildmode=c-archive $^
main.dve2C: libgo2pins.a
go build -o $@ -buildmode=c-shared
main.dve2C: main.a go2pins.o
$(CC) -shared -o $@ $(LD_BEFORE) $^ $(LD_AFTER)
libgo2pins.a: go2pins.o
$(AR) cru $@ $^
clean:
$(RM) main.dve2C main.a main.h go2pins.o
......@@ -2,8 +2,8 @@ package {{.PackageName}}
/*
#include "go2pins.h"
#cgo darwin LDFLAGS: -Wl,-undefined -Wl,dynamic_lookup
#cgo !darwin LDFLAGS: -Wl,-unresolved-symbols=ignore-all
#cgo CFLAGS: -I .
#cgo LDFLAGS: -L . -lgo2pins
*/
import "C"
import (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment