Files
CMake/Tests/ISPC/DynamicLibrary/main.cxx
Robert Maynard 8de145cae1 ISPC: DynamicLibrary test now passes on windows.
The MSVC linker needs to know what MSVC runtime a shared library
needs. ISPC objects don't have a '/DIRECTIVE' entry for the
MSVC runtime as they have no dependency on it. Therefore
we need to add a C or C++ source to each shared library so
the MSVC linker knows what runtime to embed
2020-09-10 16:15:55 -04:00

18 lines
171 B
C++

#ifdef _WIN32
# define IMPORT __declspec(dllimport)
#else
# define IMPORT
#endif
IMPORT int simple();
int extra();
int main()
{
extra();
simple();
return 0;
}