__declspec(dllimport) int func(); int main(int argc, char **argv) { return func(); } __declspec(dllexport) int testfunc() { return 20; }