File: README.md

package info (click to toggle)
kore 4.2.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 2,912 kB
  • sloc: ansic: 29,227; makefile: 344; sh: 278; python: 149; cpp: 34
file content (24 lines) | stat: -rw-r--r-- 642 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Kore example showing how to use C++ support!

All functions accessible to kore must have their prototypes wrapped with the extern keyword like so:
```
extern ā€œCā€ {
	int pageA(struct http_request *);
	int pageB(struct http_request *);
	int validatorA(struct http_request *, char *);
}
```
In order to run this example with the default C++ settings (default compiler dialect, libstdc++):
```
	# kodev run
```

In order to run with a specific dialect and C++ runtime:
```
	# env CXXSTD=c++11 CXXLIB=c++ kodev run
```

You can also supply your own compiler combined with the above:
```
	# env CC=clang++ CXXSTD=c++11 CXXLIB=c++ kodev run
```