blob: 655b3c21a20fffb643359e8c865902148eeec855 (
plain)
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
|
#include <stdio.h>
#include "hello.h"
#ifdef _MSC_VER
#include "windows.h"
#else
#define WINAPI
#endif
extern "C"
{
// test __cdecl stuff
int WINAPI foo();
// test regular C
int bar();
}
// test c++ functions
// forward declare hello and world
void hello();
void world();
int main()
{
// test static data (needs declspec to work)
Hello::Data = 120;
Hello h;
h.real();
hello();
printf(" ");
world();
printf("\n");
foo();
printf("\n");
bar();
printf("\n");
return 0;
}
|