Commit Graph

61 Commits

Author SHA1 Message Date
Vadim Zeitlin
d846a9f791 Don't use token-pasting with non-identifiers in msvc/wx/setup.h
This used to work with the non-standard preprocessor in the older MSVC
versions, but doesn't work with the new standard-compliant one in MSVS
2022 (enabled by /Zc:preprocessor).

Luckily, it seems that we don't really need it neither, as simply
expanding the macros in a /-separated strings work with both the new and
the old preprocessors and has the same effect, so just do this instead.

Also simplify the code a little by defining wxTOOLKIT_FULL and
constructing wxSETUPH_PATH once instead of twice.

See #22654, #22680.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>

(cherry picked from commit a12a2f12827e4784aa894ebbfe15e4bbab28407b)
2022-08-18 19:36:31 +02:00
Vadim Zeitlin
8b06dd03aa Use "vc143" version-dependent compiler prefix for MSVS 2022
MSVS 2022 preview defines _MSC_VER as 1930.
2021-08-24 23:05:25 +02:00
Vadim Zeitlin
1dfc18a004 Link with ws2_32.lib rather than obsolete wsock32.lib
Winsock 2 provided by ws2_32.lib is available since 1994, it should be
fine to use it even for wx in 2021.

See #15562.
2021-04-18 22:13:45 +02:00
Vadim Zeitlin
416fc8582d Remove unused code inside MSVC 6 version checks
We don't support MSVC 6 (__VISUALC__ == 1200) or eVC (1201) since more
than 5 years (see f4b80e5337), so it's
useless to keep code compiled only when this compiler is used.
2019-10-21 20:36:08 +02:00
Vadim Zeitlin
8d2b2c0f56 Add wxMSVC_VERSION_ABI_COMPAT
This symbol can be predefined to use the libraries built with "vc14x" as
the compiler prefix. This can be useful to reuse the same binaries for
all ABI-compatible VC 14.x versions: 14.0 (MSVS 2015), 14.1 (2017) and
14.2 (2019).
2019-09-29 22:59:50 +02:00
Vadim Zeitlin
5488a1438f Globally replace vadim@wxwindows.org with vadim@wxwidgets.org
The old email address is invalid since many years and shouldn't be used
any longer.

No real changes.
2019-04-22 14:12:05 +02:00
David Connet
c2c3096530 Detect MSVS 2019 in msvc/wx/setup.h correctly
_MSC_VER 1920 should be detected as MSVS 2019, which corresponds to 14.2
toolset value, rather than 14.1.
2019-03-05 23:28:20 +01:00
Vadim Zeitlin
f670cf2d29 Remove stray CR characters from msvc/wx/setup.h
See 46ba9ca2f9 which accidentally added
them.

No real changes.
2019-03-05 23:25:34 +01:00
Vadim Zeitlin
8fbca5cb70 Remove all trailing spaces
No real changes, just clean up sources by removing trailing spaces from
all the non-generated files.

This should hopefully avoid future commits mixing significant changes
with insignificant whitespace ones.
2019-01-30 17:35:54 +01:00
Vadim Zeitlin
f69dbaa1ae Introduce MSW ARM64 support
This is a preliminary ARM64 platform support for wxWidgets at "it
compiles" stage. This will allow building and testing wxWidgets based
apps for oncoming Windows 10 ARM64.

Requirements:
- Visual Studio 2017 Update 4 or later with Visual C++ compilers and
  libraries for ARM64 component installed

Building:
1. Open command prompt.
2. Change directory to build\msw subfolder.
3. Run "C:\Program Files (x86)\Microsoft Visual
   Studio\2017\Community\VC\Auxiliary\Build\vcvarsamd64_arm64.bat" once.
4. Use `nmake TARGET_CPU=ARM64 ...` to build required flavor of wxWidget
   libraries.

Notes:
1. Building of *.sln/*.vcxproj files does not support ARM64 yet. This
   requires to hardcode Windows SDK to 10.0.15063.0 or later in
   *.vcxproj files, which would render them non-compilable in older
   Visual Studio versions. Microsoft is aware of this issue and is
   planning a fix in the next version of Visual Studio.
2. wxmsw31ud_gl.dll does not build yet. Awaiting Microsoft to deliver
   missing opengl32.lib for ARM64. Please, specify USE_OPENGL=0.

Closes https://github.com/wxWidgets/wxWidgets/pull/923
2018-09-17 22:34:32 +02:00
Vadim Zeitlin
f40a39e666 Remove "adv" library from MSVS-specific header
Also stop documenting wxNO_ADV_LIB as it has no effect any more.
2018-08-27 22:50:58 +02:00
Vadim Zeitlin
30c2bbf081 Factor out WXUSINGDLL check in MSVC-specific wx/setup.h
Don't repeat the same check for !defined(WXUSINGDLL) many times.

No real changes, this is just a simplification (which should be viewed
with "git diff -w --color-words" to see how little has really changed).
2018-05-31 01:21:20 +02:00
PB
46ba9ca2f9 Fix automatic linking with MSVC for monolithic builds
MSVC users can simplify their projects by prepending
$(WXWIN)\include\msvc to the compiler include directories, which results
in automatic including the build-specific setup.h and linking all
required wxWidgets and system libraries.

This worked only for the default multilib builds but not for monolithic
builds where wxWidgets libraries are created and named differently.

This patch allows the users (by defining wxMONOLITHIC=1 in their
project) to use it also for monolithic builds.
2018-05-31 01:13:16 +02:00
Tobias Taschner
3206df50c4 Add Microsoft Visual Studio 2017 solution file for building wxMSW
Allow building with VS15 out of the box.

Closes https://github.com/wxWidgets/wxWidgets/pull/353
2017-01-16 17:02:10 +01:00
Vadim Zeitlin
f350babf36 Recognize MSVC 14 a.k.a. Visual Studio 2015 compiler.
Interpret internal compiler version value 1900 as VC14. Notice that this
required adjusting the computation of the internal version from the
user-visible one because VC13 was skipped (hopefully no black cats crossed
paths with the manager responsible for this decision).

See #16854.
2015-05-08 02:24:10 +02:00
Vadim Zeitlin
316da5d468 Auto-link expat and zlib even in non-GUI programs when using MSVC.
These libraries are not GUI-specific and should be included even in console
applications.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76981 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-08-03 12:44:40 +00:00
Paul Cornett
8b93b050cf avoid referencing xml and html libs when they are not enabled
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@76435 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-04-30 17:08:50 +00:00
Vadim Zeitlin
91bd95beb7 Allow building wxGTK using GTK+3 under Windows too.
No real changes, just use the right libraries for GTK+3 port.

Closes #15871.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75585 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2014-01-10 14:18:54 +00:00
Vadim Zeitlin
7ab1c540f8 Only auto-link wsock32.dll if net library is used.
Otherwise linking with it can create problems with the code using other
network libraries, which link with ws2_32.dll (Winsock 2).

See #15562.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75002 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-10-14 15:08:18 +00:00
Vadim Zeitlin
da0a2aca6b Handle custom configurations in MSVC-specific setup.h.
Account for wxCFG when building the paths used for MSVC autolinking. This
variable should be defined to the same value as CFG during (command line)
build.

Closes #15431.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74720 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-08-27 22:49:44 +00:00
Vadim Zeitlin
3f66f6a5b3 Remove all lines containing cvs/svn "$Id$" keyword.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.

If nothing else, this will make an eventual transition to Git simpler.

Closes #14487.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-26 16:02:46 +00:00
Vadim Zeitlin
72c5855f5c Recognize VC12 (a.k.a. MSVS 2013) and define __VISUALC12__ for it.
Closes #15320.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74479 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2013-07-10 21:29:48 +00:00
Vadim Zeitlin
d48f13a168 Allow building wxGTK under Windows with MSVC.
Replace a few more __WXMSW__ tests with __WINDOWS__ ones and modify bakefiles
to allow specifying the toolkit to be built in wxMSW makefiles.

Closes #13902.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73290 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-12-28 16:03:03 +00:00
Vadim Zeitlin
c0feacc829 Add webview library in MSVC-specific setup.h.
wxNO_WEBVIEW_LIB was documented but not implemented: webview library was never
linked in implicitly at all. Fix this by adding the missing #pragma to
msvc/wx/setup.h.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@72293 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-08-05 22:44:18 +00:00
Vadim Zeitlin
97981439aa Replace "_amd64" with "_x64" in a few more places.
Fix bakefile presets and MSVC-specific setup.h.

Also document TARGET_CPU=X64 instead of AMD64.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71979 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-07-07 15:36:58 +00:00
Vadim Zeitlin
41087dc90a Add support for MSVC 11 (a.k.a. MSVS 2012) to MSVC-specific setup.h.
Use vc110 prefix for VC11.

Closes #14366.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71638 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-06-01 22:34:21 +00:00
Vadim Zeitlin
7d2295a0ca Allow using non-MSW toolkit in MSVC-specific auto-linking header.
This makes it possible to auto-link wxGTK library when using MSVC too.

Closes #14272.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71358 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-05-04 20:35:41 +00:00
Vadim Zeitlin
2c8c1de1ee Correct wxCOMPILER_PREFIX definition when wxMSVC_VERSION is predefined.
Fix the wrong concatenation macro name that was used as using wxMSVC_VERSION
could not work as expected before (which also shows that nobody ever used it).

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70758 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-03-01 01:05:25 +00:00
Vadim Zeitlin
a47ad3591b Don't auto-link with 3rd party libraries in DLL build using MSVC.
It's unnecessary to link with these libraries as they're already embedded
inside our DLLs and the functions from them can't be used anyhow as they're
not declared as DLL-exported in the libraries headers.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2012-01-18 17:26:23 +00:00
Dimitri Schoolwerth
80fdcdb90e No changes, synchronised source names that appear commented at the top of files with the actual path to the files.
Fixed commented names (path, filename, and extension) of files in include/ and src/. Prepended the names in src/ with "src/" everywhere, while starting those in include/wx/ with "wx/".

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67254 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-03-20 00:14:35 +00:00
Vadim Zeitlin
d70fe85f46 Handle ANSI release configuration correctly in msvc/wx/setup.h.
Preprocessor operations don't work with empty values so check for the case of
empty suffix specially.

This avoid warnings about "not enough actual parameters for macro
'wxSTRINGIZE_HELPER'" from MSVC.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67015 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2011-02-24 20:34:48 +00:00
Václav Slavík
a9d41efb74 Add system libs in msvc/wx/setup.h too.
This makes it possible to use static build of wx from VC++ by just
including its headers. Even though it's common to have these libs in
your settings, it's not always the case.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63920 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-04-09 06:55:19 +00:00
Vadim Zeitlin
18a4c97b36 Allow using version-specific vc prefix in msvc/wx/setup.h.
We still use just "vc" by default for compatibility but allow the user to
predefine either wxMSVC_VERSION or wxMSVC_VERSION_AUTO to use the specified or
version-dependent prefix instead. This is very convenient when using multiple
MSVC versions.

See #11022.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63617 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-03 14:19:29 +00:00
Vadim Zeitlin
d48a4705ab Use correct directory names in msvc/wx/setup.h for 64 bit builds.
Use _amd64 and _ia64 suffixes if _M_X64 or _M_IA64 is defined.

Closes #11022.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63616 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2010-03-03 14:19:18 +00:00
Peter Cawley
77749ea963 Added automatic linking of ribbon libraries when using MSVC.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62012 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-09-22 12:13:03 +00:00
Vadim Zeitlin
c82c5274f2 Move #error for non-MSVC to the top of file.
This allows to reduce indentation of the rest of it and avoid a very long #if...#else.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61532 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-25 22:26:15 +00:00
Vadim Zeitlin
ad73320555 Add support for stc library.
Closes #11025.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61531 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-07-25 22:26:06 +00:00
Jaakko Salli
209bf72273 Setup.h wrapper was missing propgrid section (fixes #10909)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61093 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2009-06-17 20:38:20 +00:00
Vadim Zeitlin
3fb26cf229 allow predefining wxNO_XXX_LIB symbols to avoid implicitly linking with the corresponding library when using msvc/wx/setup.h
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53155 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-04-13 02:09:52 +00:00
Vadim Zeitlin
d57b71603f significantly simplify this file by using token pasting in #incoude and #pragma comment(lib) instead of repeating them 4 or 8 times
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@51439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2008-01-29 11:11:15 +00:00
Vadim Zeitlin
2ee322d90c corrected version in the libraries names: it's only 2 digits even in development branch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44441 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-10 23:50:43 +00:00
Robin Dunn
7fd3acaf54 Set version number
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44386 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2007-02-06 19:58:27 +00:00
Vadim Zeitlin
8aa2736f3c don't link with GUI libraries when wxUSE_GUI==0
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43687 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-27 15:03:59 +00:00
Vadim Zeitlin
592932859a updated version to 2.8
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-11-11 20:20:58 +00:00
Vadim Zeitlin
c6dfeb4192 include wxmsw27_gl (#if wxUSE_GLCANVAS) too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41595 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-03 15:18:26 +00:00
Vadim Zeitlin
4291c3c825 added if wxUSE_XRC/AUI/RICHTEXT around appropriate libraries
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@41594 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-10-03 15:16:28 +00:00
Julian Smart
3b2cb4316b Moved wxRichTextCtrl to its own library
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39882 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-06-29 07:16:39 +00:00
Vadim Zeitlin
4521d1cdda also link in ODBC lib if wxUSE_ODBC (patch 1457800)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38460 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2006-03-31 00:05:02 +00:00
Chris Elliott
0152ee89dd #if wxUSE_DEBUGREPORT seems Ok
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35789 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-04 08:08:11 +00:00
Chris Elliott
24d88d6d46 avoid trying to link QA if not required
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35777 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
2005-10-03 15:59:02 +00:00