aboutsummaryrefslogtreecommitdiff
path: root/test cases/d/10 d cpp/cppmain.cpp
blob: ff90e3f41880c1bb9de8f6155d9e30cc39d23163 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
extern "C" int rt_init();
extern "C" int rt_term();
extern void print_hello(int i);

int main(int, char**) {
    // initialize D runtime
    if (!rt_init())
        return 1;
    
    print_hello(1);
    
    // terminate D runtime, each initialize call
    // must be paired with a terminate call.
    if (!rt_term())
        return 1;
    
    return 0;
}