[libhandy/msvc: 7/10] demo app: Fix linking on Visual Studio-style builds
- From: Chun-wei Fan <fanchunwei src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/msvc: 7/10] demo app: Fix linking on Visual Studio-style builds
- Date: Thu, 28 Apr 2022 05:47:47 +0000 (UTC)
commit a9a39b146139099a541620bbe48c5d05f9ccb084
Author: Chun-wei Fan <fanchunwei src gnome org>
Date: Wed Jan 19 18:06:06 2022 +0800
demo app: Fix linking on Visual Studio-style builds
We must pass in '/entry:mainCRTStartup' so that things will link when
building GTK-based apps with 'gui_app: true' (i.e. '/subsystem:windows'
for Visual Studio builds).
examples/meson.build | 7 +++++++
1 file changed, 7 insertions(+)
---
diff --git a/examples/meson.build b/examples/meson.build
index 7205c3d1..908c54ef 100644
--- a/examples/meson.build
+++ b/examples/meson.build
@@ -18,9 +18,16 @@ handy_demo_sources = [
libhandy_generated_headers,
]
+demo_link_args = []
+
+if cc.get_argument_syntax() == 'msvc'
+ demo_link_args += '/entry:mainCRTStartup'
+endif
+
handy_demo = executable('handy-@0@-demo'.format(apiversion),
handy_demo_sources,
dependencies: libhandy_dep,
+ link_args: demo_link_args,
gui_app: true,
install: true,
)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]