User forums > General (but related to Code::Blocks)

Windows 11: pointer size varies depending on computer

<< < (2/4) > >>

nenin:

--- Quote from: alfredo on October 23, 2025, 10:17:05 am ---
Okay. Can you explain why the same project created on the latest version of Codeblock on Windows 11 25H2 works fine on some computers but not on others, and I have to manually change the compiler? The settings are the same. In my opinion, it has something to do with Codeblock and its integrated mingw compiler.

--- End quote ---

"project" means  "software project in C::B" or exe file, generatated by mingw gcc using C::B?
At that moment I can only suspect that you somehow installed on one PC 32b version from here: https://sourceforge.net/projects/codeblocks/files/Binaries/25.03/Windows/32bit/
 

alfredo:

--- Quote from: nenin on October 23, 2025, 12:21:24 pm ---
--- Quote from: alfredo on October 23, 2025, 10:17:05 am ---
Okay. Can you explain why the same project created on the latest version of Codeblock on Windows 11 25H2 works fine on some computers but not on others, and I have to manually change the compiler? The settings are the same. In my opinion, it has something to do with Codeblock and its integrated mingw compiler.

--- End quote ---

"project" means  "software project in C::B" or exe file, generatated by mingw gcc using C::B?
At that moment I can only suspect that you somehow installed on one PC 32b version from here: https://sourceforge.net/projects/codeblocks/files/Binaries/25.03/Windows/32bit/

--- End quote ---

Right, a Codeblocks project with the code in the first post. You can compile it yourself on another computer (I can share it). No, I am 99.99% sure that I installed 64-bit Mingw bundled with Codeblocks. In fact, if I manually change the compiler settings, I can compile it correctly. My question is: why does the same project created and used by the same version of software and compiler behave differently on different machines with the same Windows 11 25H2 64-bit?
Moreover, why in such machine I have to manually setup the compiler to mingw 64 bit and compile with -m 64?
Thank you

nenin:
"sizeof(int*)==4"  means that you somehow generated 32b code. It is not dependent on C::B, by default C::B uses default compiler, and the choice of the compiler options is not affected by this selection. It may be OK for exact compiler or may be wrong. For example, if you put something like "-march=x86-64-v2" for 32b compiler, it will be unhappy. Check name of compiler in project options on top of the dialog. If it is something like "GCC MINGW64" - it should be 64b,  if "GCC MINGW" or "GCC MINGW32" - 32b.

alfredo:

--- Quote from: nenin on October 23, 2025, 01:24:59 pm ---"sizeof(int*)==4"  means that you somehow generated 32b code. It is not dependent on C::B, by default C::B uses default compiler, and the choice of the compiler options is not affected by this selection. It may be OK for exact compiler or may be wrong. For example, if you put something like "-march=x86-64-v2" for 32b compiler, it will be unhappy. Check name of compiler in project options on top of the dialog. If it is something like "GCC MINGW64" - it should be 64b,  if "GCC MINGW" or "GCC MINGW32" - 32b.

--- End quote ---

That's clear. Can you explain why, on three different machines, with the same Windows 11 25H2 64 bit, the same Codeblocks 25.03 64 bit, and therefore the same mingw (GCC) compiler, with the same project (no copied and pasted code), I have to manually change the compiler from GCC to mingw64 only for the third machine?

* intel i5-11400 ok

* ryzen 7 7840u ok

* i5-10400 I have to change the settings

For me this is strange. What could be the reason?
Thank you

nenin:

--- Quote from: alfredo on October 23, 2025, 02:19:46 pm ---
That's clear. Can you explain why, on three different machines, with the same Windows 11 25H2 64 bit, the same Codeblocks 25.03 64 bit, and therefore the same mingw (GCC) compiler, with the same project (no copied and pasted code), I have to manually change the compiler from GCC to mingw64 only for the third machine?

* intel i5-11400 ok

* ryzen 7 7840u ok

* i5-10400 I have to change the settings
For me this is strange. What could be the reason?
Thank you

--- End quote ---
I cannot explain you this strange observation. I never faced these or similar problems, but I've never used a C::B distribution with a compiler. I`m using C::B now with 3 compilers ( 64b gcc 14.2, 32b gcc 14.2 and 32b for XP gcc 9.3) and C::B always keeps proper compiler in project, if this compiler is actually is installed. If compiler is not installed, strange things may happen, but not the one you described.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version