Skip to content

Commit

Permalink
Fix TestSharedLib not exporting ret_zero on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
fsfod committed Jan 18, 2024
1 parent 669a30d commit beae14c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions unittests/CppInterOp/TestSharedLib/TestSharedLib.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
#ifndef UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H
#define UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H

// Avoid having to mangle/demangle the symbol name in tests.
extern "C" int ret_zero();
// Avoid having to mangle/demangle the symbol name in tests
#ifdef WIN32
extern "C" __declspec(dllexport) int ret_zero();
#else
extern "C" int ret_zero();
#endif

#endif // UNITTESTS_CPPINTEROP_TESTSHAREDLIB_TESTSHAREDLIB_H

0 comments on commit beae14c

Please sign in to comment.