Skip to content

Commit c3d25bb

Browse files
authored
Merge pull request #211 from 0xAnarz/patch-1
Add CGO environment variables for Go compilation
2 parents e1a3db7 + 81639f2 commit c3d25bb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

source/ports/go_port/source/README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,13 @@ In case of using precompiled binaries (in Linux), when running any application u
6565
export LD_LIBRARY_PATH="/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib"
6666
```
6767

68+
`go build` may require to set CGO environment variables pointing to MetaCall libraries in case of undefined C headers during compilation :
69+
70+
```sh
71+
export CGO_CFLAGS=-I"/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/include"
72+
export CGO_LDFLAGS=-L"/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib"
73+
```
74+
6875
## Testing
6976

7077
For running tests:

0 commit comments

Comments
 (0)