You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 11, 2025. It is now read-only.
Copy file name to clipboardExpand all lines: docs/modules/ROOT/pages/cpp-client-getting-started.adoc
+22-7Lines changed: 22 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,7 +14,7 @@
14
14
15
15
* A text editor or IDE
16
16
* Docker
17
-
* C++ 11+
17
+
* C++ 11+ supporting compiler
18
18
* Vcpkg
19
19
20
20
== Start a Hazelcast Member
@@ -33,19 +33,33 @@ This will start a new Hazelcast member at port 5701. Now, we have a Hazelcast cl
33
33
== Install Hazelcast C++ Client
34
34
In this tutorial we will use Vcpkg for installing the C++ client. You can also use https://github.com/hazelcast/hazelcast-cpp-client/blob/master/Reference_Manual.md#111-conan-users[Conan] or install from source using CMake as explained https://github.com/hazelcast/hazelcast-cpp-client/blob/master/Reference_Manual.md#113-install-from-source-code-using-cmake[here].
35
35
36
-
Before starting download and install Vcpkg itself if you haven't already:
36
+
37
+
Before starting download and install Vcpkg itself if you haven't already: +
38
+
for Windows;
37
39
[source,bash]
38
40
----
39
41
git clone https://github.com/microsoft/vcpkg
40
42
.\vcpkg\bootstrap-vcpkg.bat
41
43
----
42
44
43
-
First, execute the following to install `hazelcast-cpp-client` ith its `boost` dependencies:
44
-
45
+
for non-Windows;
46
+
[source,bash]
47
+
----
48
+
git clone https://github.com/microsoft/vcpkg
49
+
./vcpkg/bootstrap-vcpkg.sh
50
+
----
51
+
First, execute the following to install `hazelcast-cpp-client` with its `boost` dependency: +
52
+
for Windows;
45
53
[source,bash]
46
54
----
47
-
.\vcpkg\vcpkg install hazelcast-cpp-client
55
+
.\vcpkg\vcpkg.exe install hazelcast-cpp-client
56
+
----
57
+
for non-Windows;
58
+
[source,bash]
48
59
----
60
+
./vcpkg/vcpkg install hazelcast-cpp-client
61
+
----
62
+
49
63
After the installation, the library is available for usage.
50
64
For example, if you are using CMake for your builds, you can use the following cmake build command with the `CMAKE_TOOLCHAIN_FILE` cmake option to be the `vcpkg.cmake`.
51
65
@@ -74,6 +88,7 @@ Then, You can include the library and start a client using the following code:
74
88
75
89
int main() {
76
90
auto hz = hazelcast::new_client().get();
91
+
return 0;
77
92
}
78
93
----
79
94
@@ -84,7 +99,7 @@ The following line creates and starts a new Hazelcast C++ client with the defaul
84
99
auto hz = hazelcast::new_client().get();
85
100
----
86
101
87
-
The client automatically connects to the Hazelcast member available on the local machine.
102
+
The client automatically connects to the Hazelcast member available on the local machine. Client also automatically disconnects upon its destruction.
88
103
89
104
== Use Map
90
105
@@ -200,4 +215,4 @@ There are a lot of things that you can do with the C++ client. For more, such as
200
215
check out our https://github.com/hazelcast/hazelcast-cpp-client[client repository.]
201
216
202
217
If you have any questions, suggestions, or feedback please do not hesitate to reach out to us via https://slack.hazelcast.com/[Hazelcast Community Slack.]
203
-
Also, please take a look at https://github.com/hazelcast/hazelcast-cpp-client/issues[the issue list] if you would like to contribute to the client.
218
+
Also, please take a look at https://github.com/hazelcast/hazelcast-cpp-client/issues[the issue list] if you would like to contribute to the client.
0 commit comments