README.md (642B)
1 Kore example showing how to use C++ support!
2
3 All functions accessible to kore must have their prototypes wrapped with the extern keyword like so:
4 ```
5 extern āCā {
6 int pageA(struct http_request *);
7 int pageB(struct http_request *);
8 int validatorA(struct http_request *, char *);
9 }
10 ```
11 In order to run this example with the default C++ settings (default compiler dialect, libstdc++):
12 ```
13 # kodev run
14 ```
15
16 In order to run with a specific dialect and C++ runtime:
17 ```
18 # env CXXSTD=c++11 CXXLIB=c++ kodev run
19 ```
20
21 You can also supply your own compiler combined with the above:
22 ```
23 # env CC=clang++ CXXSTD=c++11 CXXLIB=c++ kodev run
24 ```