Skip to content
This repository has been archived by the owner on Apr 20, 2024. It is now read-only.

Commit

Permalink
rmove comments to README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
MGTheTrain committed Apr 16, 2024
1 parent 0917571 commit 4828f33
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 17 deletions.
25 changes: 22 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,12 +71,31 @@ cd devops\scripts\ps1

#### Python

Navigate to the [bindings python folder](./bindings/python) after C++ source code compilation and run `python main.py --path <path to libcore_wrapper.so>`
Run:

```sh
cd bindings/python
python main.py --path <path to libcore_wrapper.so>
```

#### C#

Navigate to the [bindings c# folder](./bindings/csharp) after C++ source code compilation and follow comments in [Program.cs](./bindings/csharp/Mgtt.CoreWrapper/Program.cs)
Run:

```sh
cd bindings/csharp
dotnet build
# Copy on unix systems the libcore_wrapper.so to the `bindings/c#/Mgtt.CoreWrapper/bin/Debug/net8.0` folder
dotnet run
```

#### Go

Navigate to the [bindings go folder](./bindings/go) after C++ source code compilation and follow comments in [main.go](./bindings/go/main.go)
Run:

```sh
cd bindings/go
# Copy in the devcontainer the libcore_wrapper.so to this folder
export LD_LIBRARY_PATH=/workspaces/cpp-sample-bindings/bindings/go/libcore_wrapper.so:$LD_LIBRARY_PATH
go run main.go
```
6 changes: 1 addition & 5 deletions bindings/csharp/Mgtt.CoreWrapper/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,4 @@ static int Main(string[] args)

return 0;
}
}

// 0. Execute `dotnet build`
// 1. Copy on unix systems the libcore_wrapper.so to the `bindings/c#/Mgtt.CoreWrapper/bin/Debug/net8.0` folder
// 2. Run `dotnet run`
}
6 changes: 1 addition & 5 deletions bindings/go/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ package main
// #include <math-utils.h>
import "C"
import (
"fmt"
"fmt"
)

func main() {
Expand All @@ -51,7 +51,3 @@ func main() {
circumference := C.getCircleCircumference(C.float(radius))
fmt.Println("Circle circumference:", circumference)
}

// 0. Copy in the devcontainer the libcore_wrapper.so to this folder
// 1. In the devcontainer `export LD_LIBRARY_PATH=/workspaces/cpp-sample-bindings/bindings/go/libcore_wrapper.so:$LD_LIBRARY_PATH`
// 2. Run executable `go run main.go`
5 changes: 1 addition & 4 deletions bindings/python/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,4 @@ def main(path):
if not args.path:
parser.error('Please provide the path to the core wrapper library using --path')

main(args.path)

# 0. Copy on unix systems the libcore_wrapper.so to a desired destination folder
# 1. Run `python main.py --path <path to libcore_wrapper.so>`
main(args.path)

0 comments on commit 4828f33

Please sign in to comment.