WX and Visual Studio 2017

579 views
Skip to first unread message

Tim Burgess

unread,
Sep 11, 2017, 4:43:03 AM9/11/17
to wx-u...@googlegroups.com

Hi,

 

I downloaded and ran the installer from the WX download site, opened up the solution file for VS14, let VS15 make its changes then used the batch build option to create all of the targets. Everything built successfully on the first pass.

 

I then tried to build my application and get multiple instances of:

 

1>c:\wxwidgets-3.1.0\include\msvc\wx/setup.h(121): fatal error C1083: Cannot open include file: '../../../lib/vc_lib/mswd/wx/setup.h': No such file or directory

 

I checked and, it’s true, the specified directory does not exist, so I’ve goofed somewhere.

 

Can anybody tell me where I’ve messed up, please?

 

Best wishes.

 

Tim Burgess

 

Patrick Geltinger

unread,
Sep 11, 2017, 5:17:39 AM9/11/17
to wx-u...@googlegroups.com

You probably built the Unicode version of wxWidgets, but your application isn't.
You can check that by looking into the lib/vc_lib/ in the wxWidgets directory and
check whether there is a mswud (unicode debug) build, but not a mswd (ANSI debug) in there.

You then either have to do an ANSI build of wxWidgets or make your application Unicode. (_UNICODE has to be #define'd)

Regards,
Patrick

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to wx-users+u...@googlegroups.com
or visit http://groups.google.com/group/wx-users

Tim Burgess

unread,
Sep 11, 2017, 5:21:57 AM9/11/17
to wx-u...@googlegroups.com

Forwarding this to the list in the hope it’ll help somebody else.

 

Best wishes.

 

Tim Burgess

 

From: Tim Burgess [mailto:t...@raisedbar.net]
Sent: Monday, September 11, 2017 10:18 AM
To: 'Patrick Geltinger' <pat...@patlkli.org>
Subject: RE: WX and Visual Studio 2017

 

Hi Patrick,

 

Many thanks for this. My project was created using the VS2017 option to create a project from existing code and I’d forgotten to set the project’s character set. My previous version of the project had been configured for Unicode, so I built my WX libs accordingly.

 

Thanks again for spotting the obviousJ

 

Best wishes.

 

Tim Burgess

 

From: Patrick Geltinger [mailto:pat...@patlkli.org]
Sent: Monday, September 11, 2017 10:06 AM
To: Tim Burgess <t...@raisedbar.net>
Subject: Re: WX and Visual Studio 2017

 

You probably built the Unicode version of wxWidgets, but your application isn't.
You can check that by looking into the lib/vc_lib/ in the wxWidgets directory and
check whether there is a mswud (unicode debug) build, but not a mswd (ANSI debug) in there.

You then either have to do an ANSI build of wxWidgets or make your application Unicode. (_UNICODE has to be #define'd)

Regards,
Patrick

 

On 11.09.2017 10:43, Tim Burgess wrote:

--

Tim Burgess

unread,
Sep 12, 2017, 5:30:03 AM9/12/17
to wx-u...@googlegroups.com

Hi,

 

This is a follow-up query to help me understand the naming convention for WX paths. I am now trying to configure the 64-bit version of the project described earlier in this thread, but I’m getting:

 

1>c:\wxwidgets-3.1.0\include\msvc\wx/setup.h(121): fatal error C1083: Cannot open include file: '../../../lib/vc_x64_lib/msw/wx/setup.h': No such file or directory

 

However, my project is set to use Unicode, so the path I actually have should be OK:

 

C:\wxwidgets-3.1.0\lib\vc_x64_lib\mswu\wx\setup.h

 

I’m obviously misunderstanding something here.

 

Best wishes.

 

Tim Burgess

Patrick Geltinger

unread,
Sep 12, 2017, 5:49:08 AM9/12/17
to wx-u...@googlegroups.com
Hi Tim,

you can just check in include/msvc/wx/setup.h, how the path to the "real" setup.h is constructed:
https://github.com/wxWidgets/wxWidgets/blob/master/include/msvc/wx/setup.h#L35

If the "u" is missing in the directory name, that means that _UNICODE isn't defined, which in turn should have been defined by Visual Studio if you properly set the project character set to Unicode.

Since you used a Debug build in your last mail, please double check if you didn't miss to change the character set in the Release configuration, which you seem to be using right now.

Best regards,
Patrick

Tim Burgess

unread,
Sep 12, 2017, 6:11:38 AM9/12/17
to wx-u...@googlegroups.com

Patrick,

 

That’s great. Yes, I should have indicated that I was dealing with a release configuration this time around (debug previously). I’ll check the pre-processor directives to make sure that they include Unicode then, if that doesn’t help, I’ll fix-up setup.h as you suggest.

 

Thanks again for the advice.

Best wishes.

 

Tim Burgess

Tim Burgess

unread,
Sep 12, 2017, 6:54:47 AM9/12/17
to wx-u...@googlegroups.com

Hi,

 

Just to document that my issue was due to an empty pre-processor field in my build configuration. Adding:

 

%(PreprocessorDefinitions)

 

Fixed my issue.

Reply all
Reply to author
Forward
0 new messages