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 »

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: 19114
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 »

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 »

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: 19114
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 »

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 »

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
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
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 »

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 »

hi stahta01,
thanks for your answer.
errorWarning.png
errorWarning.png (12.28 KiB) Viewed 9593 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
Ultimate wxWidgets Guru
Ultimate wxWidgets Guru
Posts: 548
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 »

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.
drdrbergman
In need of some credit
In need of some credit
Posts: 5
Joined: Mon Oct 28, 2019 6:30 pm

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

Post by drdrbergman »

All,

I have a similar issue but not with the widgets examples. Those run fine. But the wxPLplotDemo that comes with plplot is compiling and says 1 succeeded, 0 failed and produces the exe. However, there _w64 error shows up in the error list and the exe will not run.

I built and installed widgets and plplot as per manual, both 64bit config. And the examples are all 64 bit. I am using for the project set up a combination of the settings I find in the widgets and plplot examples.

Thanks
kizzurazzgabi
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Sep 03, 2021 9:29 pm

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

Post by kizzurazzgabi »

I had the same error, I was copying over a previous wxWidgets to a new project, I got everything right except one thing. and so how I fixed it was this, -> Under platforms, I forgot to select ALL PLAYFORMS, and then i had to retype the '$(WXWIN)\include; $(WXWIN)\include\msvc' in additional include directories in c/c++, and then in linkers additional include directories '$(WXWIN)\lib\vc_lib'
Something about all-platofrms allows it to function properly. Hope this helps
Post Reply