Wxwidgets Visual Studio 2019

Hello,

I have a 64 bit C++ Windows program under development using wxWidgets 304. It compiles and runs OK using Visual Studio 2019. However, if I run it in debug mode and stop at a breakpoint to make a minor code change, and then try to resume running with “edit and continue” enabled, the compilation fails, and the only error listed is that below:

Severity

Code

Description

Project

File

Line

Suppression State

Error (active)

E1256

__w64 can only be specified on int, long, and pointer types

neurosim

C:wxWidgets304includewxdefs.h

1301

C - win32 API - Visual Studio 2008 - Windows 2007 2011 Senior Software Engineer at Dictao Dictao is a software company which provides security solutions for banks.

Interestingly, the same error is specified even during a main compile, but it does not prevent the compile completing and the program running.

Wxwidgets visual studio 2019 tutorial

Line 1301 of defs.h contains:

  1. C - win32 API - Visual Studio 2008 - Windows 2007 2011 Senior Software Engineer at Dictao Dictao is a software company which provides security solutions for banks.
  2. Use the prebuilt wxWidgets CodePak from CodePaks to build. Visual Studio - Contains a built-in profiler. This page was last edited on 26 May 2019, at 03:41.

typedefwxW64ssize_twxIntPtr;

Fs19 krone primos 5000 series Description: By Premos 5000 Krone offers first pellet-harvesting, can be produced directly in the field with the Halmgutpellets. This allows renewable agricultural raw materials and secondary raw materials are useful used for energy, thus helping to reduce CO?

Here is a screenshot of surrounding code from defs.h:

The Microsoft help on __w64 states that it is deprecated, but it suggests that the problem is something to do with 32/64 bit compatibility.

I was wondering if anyone could advise me as to what changes I could/should make to the defs.h to avoid this problem? I haven’t tried messing with the library code myself since I’d rather see if an expert knew what to do before diving in and experimenting myself.

Obviously this is not a blocking problem since my program still compiles and works. But edit-and-continue debugging does speed up development considerably, so it is irritating to not have it available.

Thanks for any advice,

Bill Heitler

First created on 2018-02-14
Last updated on 2019-03-04

Valid for Visual Studio 2017 (versions 15.3 and up).

There is a wxWidgets vcpkg package that provides both release and debug libraries for the latest release. These libraries are built as Unicode DLLs. You should use the vcpkg package unless you have specific requirements for either static libraries or other versions of wxWidgets. See C++ Package Manager: vcpkg for more information on vcpkg and installing the wxWidgets package.

The wxWidgets website also provides Windows binary files, both release files for use with pre-built programs, and development files for developing wxWidgets applications using various versions of Visual Studio. However, the wxWidgets website recommends that you build wxWidgets from source.

If building from source, you have two choices:

  • latest stable release
  • latest development release

C# Wxwidget

There is also a much older stable release (2.8.12) available, but there is no guarantee that it can be built with Visual Studio 2017. You should avoid this version unless you are required to maintain applications that use this version. In that case, you will probably have to use a much older version of Visual Studio as well.

Warning: For some reason, the GitHub repository does not contain all of the files needed to build all of the wxWidgets projects using Visual Studio. Do not download the repository Zip file or clone the repository. Apparently, you can use nmake to build the libraries, but not Visual Studio. Therefore, use only the stable or development release sources.

C++ Wxwidgets

In this article, I will cover building from the two sources listed above.

Getting the wxWidgets Source Code

At the time of writing this article, the latest stable release is 3.0.4 and the latest development version is 3.1.2.

  1. Create a directory to place the wxWidgets source code into. I will assume that this directory is C:wxWidgets. The instructions in this post assume this location.
  2. Download the source code for the latest stable or latest development release from the wxWidgets download page. Modify the version number in the file names as appropriated when a newer release is issued. The file that you need to download is either wxWidgets-3.0.4.7z or wxWidgets-3.0.4.zip (or wxWidgets-3.1.2.7z or wxWidgets-3.1.2.zip). The 7z file is much smaller than the zip file, and expands much more quickly as well.
  3. Open the downloaded file. Use the 7Zip utility to open the 7z file. Windows Explorer will open and expand the zip file.
  4. Expand the files into the directory you created in step 1.

Building wxWidgets

wxWidgets 3.0.4

  1. Start Visual Studio 2017.
  2. Open the solution file wx_vc12.sln which is located in C:wxWidgetsbuildmsw.
  3. When the solution opens, the Review Solution Actions dialog will display:
    Male sure that Upgrade to v141 is selected from the Platform Toolset dropdown. Select the OK button. The solution will be retargeted from Visual Studio 2013 to Visual Studio 2017.
  4. Select the configuration that you want to build. Configurations are either 32-bit or 64-bit. Build both Debug and Release, or DLL Debug and DLL Release. You will need the debug files when building debug wxWidgets applications, and the release files when building release applications. Here are what the four builds are for each of 32-bit and 64-bit builds:
    • Debug – static library debug build
    • DLL Debug – debug build as a set of DLLs
    • DLL Release – release build as a set of DLLs
    • Release – static library release build.
  5. Select Build→Build Solution to build the selected solution. For x64 builds, a number of warnings are produced. These can be safely ignored.
  6. Repeat steps 4 and 5 for every other configuration that you want to build.

wxWidgets 3.1.2

  1. Start Visual Studio 2017.
  2. Open the solution file wx_vc15.sln which is located in C:wxWidgetsbuildmsw.
  3. Select the configuration that you want to build. Configurations are either 32-bit or 64-bit. Select release configurations if you will be using wxWidgets to build GUI applications. Only select the debug configurations if you will be modifying wxWidgets.
    • Debug – static library debug build
    • DLL Debug – debug build as a set of DLLs
    • DLL Release – release build as a set of DLLs
    • Release – static library release build.
  4. Select Build→Build Solution to build the selected solution. For x64 builds, a number of warnings are produced. These can be safely ignored.
  5. Repeat steps 3 and 4 for every other configuration that you want to build.