[Git][slirp/libslirp][master] 2 commits: windows: allow static linking with LIBSLIRP_STATIC macro
Samuel Thibault (@sthibaul)
gitlab at gitlab.freedesktop.org
Sun Jun 2 18:44:22 UTC 2024
Samuel Thibault pushed to branch master at slirp / libslirp
Commits:
84361923 by Biswapriyo Nath at 2024-06-01T14:27:26+00:00
windows: allow static linking with LIBSLIRP_STATIC macro
When the macro is defined it will help to link with libslirp statically.
Otherwise, dllimport attribute is added with function symbols and linker
errors are shown as following for static linking.
undefined reference to `__imp_slirp_input'
undefined reference to `__imp_slirp_cleanup'
undefined reference to `__imp_slirp_remove_hostfwd'
etc.
- - - - -
78106502 by Samuel Thibault at 2024-06-02T18:44:20+00:00
Merge branch 'win32-static-linking' into 'master'
windows: allow static linking with LIBSLIRP_STATIC macro
See merge request slirp/libslirp!134
- - - - -
1 changed file:
- src/libslirp.h
Changes:
=====================================
src/libslirp.h
=====================================
@@ -12,7 +12,9 @@
#include <in6addr.h>
#include <basetsd.h>
typedef SSIZE_T slirp_ssize_t;
-#ifdef BUILDING_LIBSLIRP
+#ifdef LIBSLIRP_STATIC
+# define SLIRP_EXPORT
+#elif defined(BUILDING_LIBSLIRP)
# define SLIRP_EXPORT __declspec(dllexport)
#else
# define SLIRP_EXPORT __declspec(dllimport)
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/6ea2c4f95922a64d21190d9ad163e3bbde37a836...78106502773ae8407450ec16349f25214bbda099
--
This project does not include diff previews in email notifications.
View it on GitLab: https://gitlab.freedesktop.org/slirp/libslirp/-/compare/6ea2c4f95922a64d21190d9ad163e3bbde37a836...78106502773ae8407450ec16349f25214bbda099
You're receiving this email because of your account on gitlab.freedesktop.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/slirp/attachments/20240602/685ffe6a/attachment.htm>
More information about the Slirp
mailing list