forked from google/or-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
README.cc.java.dotnet
98 lines (82 loc) · 3 KB
/
README.cc.java.dotnet
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# Introduction
This file describes how to install the OR-Tools C++, Java and .Net binary archive.
OR-Tools is located at https://developers.google.com/optimization
These modules have been tested under:
- Ubuntu 14.04, 16.04, 17.10 and 18.04 (64-bit).
- macOS 10.13 High Sierra with Xcode 9.4 (64 bit).
- Microsoft Windows with Visual Studio 2015 and 2017 (64-bit)
Upon decompressing the archive, you will get the following structure:
```
or-tools/
LICENSE-2.0.txt <- Apache 2.0 License
README.md <- This file
Makefile <- Main Makefile for C++,Java and .Net
examples/ <- C++, Java and .Net examples
include/ <- all include files
objs/ <- directory containing C++ compiled object files (*.o)
classes/ <- directory containing Java class files.
packages/ <- directory containing .Net nuget packages.
lib/ <- directory containing libraries and jar files.
bin/ <- directory containing executable files
```
# C++
Running the examples will involve compiling them, then running them.
We have provided a makefile target to help you.
Use Makefile:
```shell
make run SOURCE=examples/cpp/golomb.cc
```
**OR** this is equivalent to compiling and running
`examples/cpp/golomb.cc`.
- on Unix:
```shell
make bin/golomb
./bin/golomb
```
- on Windows:
```shell
make bin\\golomb.exe
bin\\golomb.exe
```
# Java
Running the examples will involve compiling them, then running them.
We have provided a makefile target to help you. You need to have the
java and javac tools accessible from the command line.
Use Makefile:
```shell
make run SOURCE=examples/java/RabbitsPheasants.java
```
**OR** this is equivalent to compiling and running
`examples/java/RabbitsPheasants.java`.
- on Unix:
```shell
javac -d classes/RabbitsPheasants -cp lib/com.google.ortools.jar:lib/protobuf.jar examples/java/RabbitsPheasants.java
jar cvf lib/RabbitsPheasants.jar -C classes/RabbitsPheasants .
java -Djava.library.path=lib -cp lib/RabbitsPheasants.jar:lib/com.google.ortools.jar:lib/protobuf.jar RabbitsPheasants
```
- on Windows:
```shell
javac -d class/RabbitsPheasants -cp lib/com.google.ortools.jar;lib/protobuf.jar examples/java/RabbitsPheasants.java
jar cvf lib/RabbitsPheasants.jar -C classes/RabbitsPheasants .
java -Djava.library.path=lib -cp lib/RabbitPheasants.jar;lib/com.google.ortools.jar;lib/protobuf.jar RabbitsPheasants
```
# .Net
Running the examples will involve compiling them, then running them.
We have provided a makefile target to help you. You need to have the
dotnet/cli tools accessible from the command line.
Use Makefile:
```shell
make run SOURCE=examples/dotnet/csflow.cs
```
**OR** this is equivalent to compiling and running
`examples/dotnet/csflow.cs`.
- on Unix:
```shell
dotnet build examples/dotnet/csflow.csproj
dotnet run --no-build --project examples/dotnet/csflow.csproj
```
- on Windows:
```shell
dotnet build examples\dotnet\csflow.csproj
dotnet run --no-build --project examples\dotnet\csflow.csproj
```