Looking for a current working Visual Studio C++ sample  [SOLVED]

Do you have a question about makefiles, a compiler or IDE you are using and need to know how to set it up for wxWidgets or why it doesn't compile but other IDE's do ? Post your questions here.
GregJ7
In need of some credit
In need of some credit
Posts: 1
Joined: Fri Dec 28, 2018 7:16 pm

Looking for a current working Visual Studio C++ sample

Postby GregJ7 » Fri Dec 28, 2018 7:35 pm

Does anyone have a current Visual C++ (v15.9.4) wxWidgets desktop solution (all the files) that builds & runs that I can get a copy of? The official instructions at https://wiki.wxwidgets.org/Microsoft_Vi ... B%2B_Guide are out of date. In the pinned FAQ post for this forum, "Robert Roebling's Hello World" looks like what I would want (if it were up to date), but the link is broken. Where I'm at is getting an error related to "wx_core.vcxproj" for sample project "minimal" which is a file that is not in my wxWidgets installed directories or in the "minimal" project directory on github. I've been battling VS for over 3 hours now and am tired of it (I haven't used VS in a while, but it is the only IDE I am familiar with).

catalin
Moderator
Moderator
Posts: 1480
Joined: Wed Nov 12, 2008 7:23 am
Location: Romania

Re: Looking for a current working Visual Studio C++ sample

Postby catalin » Fri Dec 28, 2018 7:59 pm

It should really be as easy as downloading the sources, opening the relevant .sln file and hitting "Build Solution (F7)".

PB
Part Of The Furniture
Part Of The Furniture
Posts: 1788
Joined: Sun Jan 03, 2010 5:45 pm

Re: Looking for a current working Visual Studio C++ sample  [SOLVED]

Postby PB » Fri Dec 28, 2018 8:28 pm

Using wxWidgets with MSVC is super simple, just follow the current offical instructions:
https://github.com/wxWidgets/wxWidgets/blob/master/docs/msw/install.md

EDIT
FWIW, I am attaching an example of simple MSVC 2017 project using wxWidgets (tested with v3.1.2). It has 4 configurations in both 32- and 64-bit:
- Debug (for static Debug build),
- Release (for static Release build),
- DLL Debug (for dynamic Debug build),
- DLL Release (for dynamic Release build).

It does not use the newest way of adding wxWidgets to a project (via property sheet), instead it uses MSVC-specific setup.h and manually set include and library paths.

It is set up for Windows SDK version 10.0.17763.0 (if this version is not installed, the solution needs to be retargeted) and Platform Toolset v141.

It expects that WXWIN system environment variable is set properly.

It expects folders with 64-bit builds of wxWidgets to have _x64 in the name (i.e., the library folder is vc_x64_lib for the static build and vc_x64_dll for the DLL one) so 32- and 64-bit builds of wxWidgets can easily co-exist. If your wxWidgets are not set like this, it must be changed in project's Configuration Properties: in Linker / General / Additional Library Directories and if using a DLL configuration then also in Debugging / Environment.
Attachments
wxWidgets MSVC app template.zip
(7.39 KiB) Downloaded 7 times


Return to “Compiler / Linking / IDE Related”

Who is online

Users browsing this forum: No registered users and 4 guests