defs.h issue: edit and continue

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

defs.h issue: edit and continue

William Heitler

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:\wxWidgets304\include\wx\defs.h

1301

 

 

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

 

Line 1301 of defs.h contains:

 

    typedef wxW64 ssize_t wxIntPtr;

 

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

 

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.
 
To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users
Reply | Threaded
Open this post in threaded view
|

Re: defs.h issue: edit and continue

Vadim Zeitlin-4
On Wed, 1 May 2019 19:50:30 +0000 William Heitler wrote:

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

 I'm not sure what kind of diagnostic exactly is this. It definitely
doesn't look like a compilation error or warning and I don't see it myself
when compiling either wxWidgets itself or the minimal sample (albeit with
MSVS 2017 and not 2019) for x64 platform.

 But in any case, I'm all but certain that it's unrelated to the E&C
failure that you're experiencing, in my, admittedly dated, experience with
it, it's just flaky with larger projects. But it works perfectly with small
ones, like the minimal sample, where I've just tested it.

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

 What non-default options do you use for compiling your application? I
think we should indeed remove wxW64, but it would be better if I could
reproduce the existing problem before fixing it.

WH> Line 1301 of defs.h contains:
WH>  
WH>     typedef wxW64 ssize_t wxIntPtr;
WH>  
WH> Here is a screenshot of surrounding code from defs.h:

 Please don't post code screenshots, they're much better as text. Or links
to GitHub, like this one:

https://github.com/wxWidgets/wxWidgets/blob/v3.0.4/include/wx/defs.h#L1301

WH> I was wondering if anyone could advise me as to what changes I
WH> could/should make to the defs.h to avoid this problem?

 You can remove wxW64 from that line, which should fix the warning/error
above, but I doubt it's going to help with your E&C problem and
unfortunately I don't know what will.

 Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/

attachment0 (203 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

RE: defs.h issue: edit and continue

William Heitler
Thanks for the advice. I'll try removing the wxW64 line and let you know if that fixes it, though I suspect you're right and it's a VS/my-code problem.
Sorry about the screenshot - won't do that again.
Bill Heitler

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of Vadim Zeitlin
Sent: 02 May 2019 01:30
To: [hidden email]
Subject: Re: defs.h issue: edit and continue

On Wed, 1 May 2019 19:50:30 +0000 William Heitler wrote:

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

 I'm not sure what kind of diagnostic exactly is this. It definitely doesn't look like a compilation error or warning and I don't see it myself when compiling either wxWidgets itself or the minimal sample (albeit with MSVS 2017 and not 2019) for x64 platform.

 But in any case, I'm all but certain that it's unrelated to the E&C failure that you're experiencing, in my, admittedly dated, experience with it, it's just flaky with larger projects. But it works perfectly with small ones, like the minimal sample, where I've just tested it.

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

 What non-default options do you use for compiling your application? I think we should indeed remove wxW64, but it would be better if I could reproduce the existing problem before fixing it.

WH> Line 1301 of defs.h contains:
WH>  
WH>     typedef wxW64 ssize_t wxIntPtr;
WH>  
WH> Here is a screenshot of surrounding code from defs.h:

 Please don't post code screenshots, they're much better as text. Or links to GitHub, like this one:

https://github.com/wxWidgets/wxWidgets/blob/v3.0.4/include/wx/defs.h#L1301

WH> I was wondering if anyone could advise me as to what changes I
WH> could/should make to the defs.h to avoid this problem?

 You can remove wxW64 from that line, which should fix the warning/error above, but I doubt it's going to help with your E&C problem and unfortunately I don't know what will.

 Regards,
VZ

--
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/

--
Please read http://www.wxwidgets.org/support/mlhowto.htm before posting.

To unsubscribe, send email to [hidden email]
or visit http://groups.google.com/group/wx-users