mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
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
18 lines
171 B
C++
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;
|
|
}
|