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

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.
Post Reply
Pixma
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Aug 07, 2019 3:42 pm

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

Post by Pixma » Wed Aug 07, 2019 3:52 pm

Hi,

i have a problem.
When I open the WXWidget minimal sample with x64 build settings, I get the following error:
Error:
  • Description: __w64 can only be specified on int, long, and pointer types
  • Project: minimal
  • File: types.h
  • Line: 387
Compiling and running of the sample is easily possible.
But I want to get rid of this error, because it could confuse me, during developing.
I am using Visual Studio 2015 (v140).

Best regards

Pixma

User avatar
doublemax
Moderator
Moderator
Posts: 13879
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: x64 - vs2015 - __w64 can only be specified on int, long and pointer types

Post by doublemax » Wed Aug 07, 2019 7:28 pm

Which wxWidgets version are you using? If it's an older one, please try again with version 3.1.3 or the latest from Github.

How did you build wxWidgets itself and how the sample?
Compiling and running of the sample is easily possible.
If you get a compiler error, how is that possible?

I don't have VS2015 here for testing, but i know wxWidgets builds fine with VS2013 and VS2017.
Use the source, Luke!

Pixma
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Aug 07, 2019 3:42 pm

Re: x64 - vs2015 - __w64 can only be specified on int, long and pointer types

Post by Pixma » Thu Aug 08, 2019 4:32 am

Hi doublemax,

I am using the latest WxWidget Version (3.1.3).
Sorry, it's my fault. It is not a compiler error.
It is an error which is shown in the Visual Studio "Error List", when I open the solution minimal.
the solution builds properly, when I click the build or rebuild button.
Perhaps it is a bug of Intellisense, i don't know?

User avatar
doublemax
Moderator
Moderator
Posts: 13879
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Re: x64 - vs2015 - __w64 can only be specified on int, long and pointer types

Post by doublemax » Thu Aug 08, 2019 5:19 am

Thanks for the clarification. I Googled for the error message and it seems indeed be related to Intellisense. But i found no solution or an explanation why it only seems to happen for a few people. Did you install the latest update for VS2015?

Maybe clearing the Intellisense cache helps?

I also found a related post that suggests to just remove the "wxW64" from the offending line:
http://wxwidgets.10942.n7.nabble.com/de ... tml#a94211
Use the source, Luke!

Pixma
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Aug 07, 2019 3:42 pm

Re: x64 - vs2015 - __w64 can only be specified on int, long and pointer types

Post by Pixma » Thu Aug 08, 2019 7:18 pm

hi,
no problem.
the error itself is not bad now.
He just bothers a little.
But everything is working.
So, everythinh is fine.
Yes, I installed the latest Update for Visual Studio 2015 (Version 14.0.25431.01 Update 3).
In Vs 2015, I found no possibility to clear the Intellisense Cache, because I have no .sdf file, which is the
intellisense database. (https://stackoverflow.com/questions/182 ... ual-studio)

Thanks for the Link, but I do not want to manipulate the wxwidget sourcecode.
So, I finally think, it is time to switch to Visual Studio 2017, in the near future. :)

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 262
Joined: Fri Nov 03, 2006 2:00 pm

Re: x64 - vs2015 - __w64 can only be specified on int, long and pointer types

Post by stahta01 » Fri Aug 09, 2019 3:33 pm

You really need to learn the difference between an compiler error and a compiler warning!

Tim S.

Pixma
In need of some credit
In need of some credit
Posts: 4
Joined: Wed Aug 07, 2019 3:42 pm

Re: x64 - vs2015 - __w64 can only be specified on int, long and pointer types

Post by Pixma » Fri Aug 09, 2019 7:14 pm

hi stahta01,
thanks for your answer.
errorWarning.png
errorWarning.png (12.28 KiB) Viewed 115 times
I looked know a twice time and see that it has an other icon than an normal compiler error.
So I think this Icon could be interpreted as an syntax check error of intellisense.
The both warnings, are compiler warnings, which hab numbers and occurs during compile time.
Notice please, I added both warning only for this screenshot. In my real project, I haven't this bad code which produces the warning.

Best regards

Pixma

stahta01
Super wx Problem Solver
Super wx Problem Solver
Posts: 262
Joined: Fri Nov 03, 2006 2:00 pm

Re: x64 - vs2015 - __w64 can only be specified on int, long and pointer types

Post by stahta01 » Sat Aug 10, 2019 12:37 am

So, you have an IDE that says a warning is an error; you might wish to figure out how to get the real compiler response instead of the IDE response. But, this might not be possible with your IDE.

Tim S.

Post Reply