msvs 2015 x64 gives _w64 can only be specified on int, long, and pointer types Topic is solved

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
fps079
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Jun 26, 2020 4:50 pm

msvs 2015 x64 gives _w64 can only be specified on int, long, and pointer types

Post by fps079 »

Hi all,

I built wxWidgets libraries from the Visual Studio 2015 GUI and was able to generate the debug and release libraries in x86 and x64.

However when I use the libraries only the x86 versions work.

If I try and build my project with the x64 version I get two errors during linking:

_w64 can only be specified on int, long, and pointer types and
LNK1104 cannot open file 'wxbase32ud.lib'

obviously I am doing sometime wrong if windows can't even read a library that it created.

I have been up and down the internet trying things like rebuilding the libraries, trying all the different directories and preprocessor stuff, nothing seems to work. I even tried the things on the "_w64 can only be specified on int, long. and pointer types" thread that dohpam1ne had, but no dice.

I have followed the documentation to build the wxWidgets libraries on msvs.

Any help would be appreciated.
PB
Part Of The Furniture
Part Of The Furniture
Posts: 4204
Joined: Sun Jan 03, 2010 5:45 pm

Re: msvs 2015 x64 gives _w64 can only be specified on int, long, and pointer types

Post by PB »

Is your project linker path pointing to the correct library, i.e. by default for static build

Code: Select all

$(WXWIN)\lib\vc_x64_lib
If you do not use MSVC-specific include, did you also change the include path be like e.g. this for static debug build

Code: Select all

$(WXWIN)\lib\vc_x64_lib\mswud;$(WXWIN)\include
The library name is for some reason also wrong. The latest wxWidgets version is 3.1.4, so you cannot have 'wxbase32ud.lib' which would be for v3.2.
fps079
In need of some credit
In need of some credit
Posts: 2
Joined: Fri Jun 26, 2020 4:50 pm

Re: msvs 2015 x64 gives _w64 can only be specified on int, long, and pointer types

Post by fps079 »

Hello PB.

You got it. I am using stable 3.0.5 version of wxWidgets, so my library is wxbase30ud.lib. I am working also with opengl32.lib and so confabulated the library name into wxbase32ud.lib instead of wxbase30ud.lib.

Anyway I realized my issue this morning and corrected the name. Eventually I got it to work.

Thank you for responding. I appreciate it.
Post Reply