Page 1 of 1

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

Posted: Wed Aug 07, 2019 3:52 pm
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

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

Posted: Wed Aug 07, 2019 7:28 pm
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.

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

Posted: Thu Aug 08, 2019 4:32 am
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?

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

Posted: Thu Aug 08, 2019 5:19 am
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

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

Posted: Thu Aug 08, 2019 7:18 pm
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. :)

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

Posted: Fri Aug 09, 2019 3:33 pm
by stahta01
You really need to learn the difference between an compiler error and a compiler warning!

Tim S.

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

Posted: Fri Aug 09, 2019 7:14 pm
by Pixma
hi stahta01,
thanks for your answer.
errorWarning.png
errorWarning.png (12.28 KiB) Viewed 9638 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

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

Posted: Sat Aug 10, 2019 12:37 am
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.

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

Posted: Mon Nov 04, 2019 3:34 pm
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

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

Posted: Fri Sep 03, 2021 9:33 pm
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