Skip to content

Commit

Permalink
Update readme from Go port.
Browse files Browse the repository at this point in the history
  • Loading branch information
viferga committed Oct 20, 2021
1 parent c3d25bb commit bfb2610
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions source/ports/go_port/source/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,18 +59,17 @@ func main() {
go build
```

In case of using precompiled binaries (in Linux), when running any application using MetaCall, you must set the environment variable `LD_LIBRARY_PATH` pointing to the MetaCall library (a part of setting any other required environment variable related to MetaCall if needed). For example:

```sh
export LD_LIBRARY_PATH="/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib"
```

`go build` may require to set CGO environment variables pointing to MetaCall libraries in case of undefined C headers during compilation :

```sh
export CGO_CFLAGS=-I"/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/include"
export CGO_LDFLAGS=-L"/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib"
```
In case of using precompiled binaries (in Linux):
- When building, `go build` may require to set CGO environment variables pointing to MetaCall libraries in case of undefined C headers during compilation:
```sh
export CGO_CFLAGS="-I/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/include"
export CGO_LDFLAGS="-L/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib"
```

- When running any application using MetaCall, you must set the environment variable `LD_LIBRARY_PATH` pointing to the MetaCall library (a part of setting any other required environment variable related to MetaCall if needed). For example:
```sh
export LD_LIBRARY_PATH="/gnu/store/`ls /gnu/store/ | grep metacall | head -n 1`/lib"
```

## Testing

Expand All @@ -82,7 +81,7 @@ go test

## Benchmarks

For running tests:
For running benchmarks:

```sh
go test -bench=.
Expand Down

0 comments on commit bfb2610

Please sign in to comment.