diff options
Diffstat (limited to 'Tests/RunCMake/AutoExportDll/say.cxx')
-rw-r--r-- | Tests/RunCMake/AutoExportDll/say.cxx | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/Tests/RunCMake/AutoExportDll/say.cxx b/Tests/RunCMake/AutoExportDll/say.cxx index e966b1f..eb9c0ff 100644 --- a/Tests/RunCMake/AutoExportDll/say.cxx +++ b/Tests/RunCMake/AutoExportDll/say.cxx @@ -12,6 +12,15 @@ int WINAPI foo(); // test regular C int bar(); int objlib(); +void justnop(); + +// test const export +#ifdef _WIN32 +// data symbols must be explicitly imported +__declspec(dllimport) extern const char testconst[]; +#else +extern const char testconst[]; +#endif } // test c++ functions @@ -42,5 +51,10 @@ int main() bar(); objlib(); printf("\n"); + printf("%s", testconst); + printf("\n"); +#ifdef HAS_JUSTNOP + justnop(); +#endif return 0; } |