Author Topic: Windows 11: pointer size varies depending on computer  (Read 1344 times)

Offline gd_on

  • Lives here!
  • ****
  • Posts: 831
Re: Windows 11: pointer size varies depending on computer
« Reply #15 on: Yesterday at 12:44:41 pm »
You seem to have two paths for compilers :
C:\mingw-w64\mingw64
and
C:\Program Files\CodeBlocks\MinGW
Both are used in the working test, for compiling (two sub \include paths) and for linking (two sub \lib paths).
Normally, you should have only one \include path and one \lib path. Two paths may give conflicts, especially if they are different.

The second compiler path, is, I suppose, for the installed compiler distributed with Code::Blocks (winlibs 14.2). How did you obtain the content of C:\mingw-w64\mingw64 ?
And how is configured your "GNU GCC Compiler" and your "GNU GCC MinGW64 Compiler".
As I saided previously, it looks like you have two compilers installed in two different places. But I'm not on your PC and cannot check this for you.
Windows 11 64 bits (25H2), svn C::B (last version or almost!), wxWidgets 3.3.1, Msys2 Compilers 15.2.0, 64 bits (seh, posix : gcc, g++ and gfortran in C:\msys64\mingw64) or 32 bits (dwarf2, posix  in C:\msys64\mingw32).

Offline alfredo

  • Single posting newcomer
  • *
  • Posts: 8
Re: Windows 11: pointer size varies depending on computer
« Reply #16 on: Yesterday at 06:44:04 pm »
You seem to have two paths for compilers :
C:\mingw-w64\mingw64
and
C:\Program Files\CodeBlocks\MinGW
Both are used in the working test, for compiling (two sub \include paths) and for linking (two sub \lib paths).
Normally, you should have only one \include path and one \lib path. Two paths may give conflicts, especially if they are different.

The second compiler path, is, I suppose, for the installed compiler distributed with Code::Blocks (winlibs 14.2). How did you obtain the content of C:\mingw-w64\mingw64 ?
And how is configured your "GNU GCC Compiler" and your "GNU GCC MinGW64 Compiler".
As I saided previously, it looks like you have two compilers installed in two different places. But I'm not on your PC and cannot check this for you.

I don't have access to that computer at the moment, so I'll have to check. However, I usually download Codeblocks from its website or install it via Chocolatey, and I've never had this kind of problem.
On my main computer, I installed Windows 11 25H2 via VirtualBox and Codeblocks via Chocolatey, and it compiled the same code with the correct 64-bit compiler without changing any settings, as it should.

Code
-------------- Clean: Debug in Test (compiler: GNU GCC Compiler)---------------

Cleaned "Test - Debug"

-------------- Build: Debug in Test (compiler: GNU GCC Compiler)---------------

g++.exe -Wall -fexceptions -g  -c C:\Users\user\test\main.cpp -o obj\Debug\main.o
g++.exe  -o bin\Debug\test.exe obj\Debug\main.o   
Output file is bin\Debug\test.exe with size 109.55 KB
Process terminated with status 0 (0 minute(s), 3 second(s))
0 error(s), 0 warning(s) (0 minute(s), 3 second(s))