Skip to content

Commit 3cf78d4

Browse files
committed
Guess at Windows link flags because I can't get a local build system working
1 parent 603497f commit 3cf78d4

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

go/cpossum/c-possum.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,10 @@ package possumC
22

33
/*
44
// I think we trigger static linking on Linux because we don't want to have to specify the path to
5-
// the library at runtime. I can't seem to get CGO on macOS to do the same.
6-
#cgo !darwin LDFLAGS: -L${SRCDIR}/../../target/debug -l:libpossum.a -lm
7-
#cgo darwin LDFLAGS: -L${SRCDIR}/../../target/debug -lpossum
5+
// the library at runtime. I can't seem to get CGO on macOS to do the same. I can't get a reliable
6+
// Windows system to get to the point I can actually build this, so I don't know how it works there.
7+
#cgo !windows && !darwin LDFLAGS: -L${SRCDIR}/../../target/debug -l:libpossum.a -lm
8+
#cgo darwin || windows LDFLAGS: -L${SRCDIR}/../../target/debug -lpossum
89
#include "possum.h"
910
*/
1011
import "C"

0 commit comments

Comments
 (0)