]> git.tdb.fi Git - libs/math.git/commitdiff
Add a dummy function to trigger import library generation on MSVC
authorMikko Rasa <tdb@tdb.fi>
Tue, 5 Sep 2023 09:20:49 +0000 (12:20 +0300)
committerMikko Rasa <tdb@tdb.fi>
Tue, 5 Sep 2023 09:21:06 +0000 (12:21 +0300)
Really this should be marked as static-only / no-library, but builder
does not support that yet.

source/linal/dummy.cpp

index 74a8e4435db6ac6be242a42af1220a55487b302e..84952ac49e14cfbd9bc9870fa16763409d493986 100644 (file)
@@ -5,3 +5,12 @@
 
 /* This dummy file is needed to make Builder happy, and also serves as a syntax
 check by pulling in all the headers. */
+
+#ifdef _WIN32
+namespace Msp {
+
+// This dummy function triggers the MSVC linker to create an import library.
+__declspec(dllexport) void mspmath_dummy_func() { }
+
+} // namespace Msp
+#endif