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

Windows 11: pointer size varies depending on computer

(1/4) > >>

alfredo:
Hi,
I have a strange, at least for me, behavior with windows 11 25H2 64 bit, codeblock 25.03 with gcc 14.2.0 64 bit compiler and pointer.
The code is very simple:


--- Code: ---#include <iostream>

using namespace std;

int main()
{
    cout << sizeof(int *) << endl;

    return 0;
}
--- End code ---

The output is 4 byte on i5-10400 CPU that is wrong whereas is 8 byte on i5-11400 and various ryzen CPUs that is correct.
I tried to copy the same project into the different machines and I had problem only with the first one.
If I manually force -m 64 on the first machine, I get sorry, unimplemented: 64-bit mode not compiled in.. Then I have to manually set on build option minGW64 compiler instead of GCC and it works with -m 64, but it does with default settings.
What could be the reason for this?
Thank you

Miguel Gimenez:
Code::Blocks is an IDE, any concerns related to compilers should be dealt with in their respective support pages.

alfredo:

--- Quote from: Miguel Gimenez on October 22, 2025, 01:10:14 pm ---Code::Blocks is an IDE, any concerns related to compilers should be dealt with in their respective support pages.

--- End quote ---

Correct, but in this case it is an issue with the IDE not configuring the compiler settings correctly.

nenin:

--- Quote from: alfredo on October 22, 2025, 10:35:38 pm ---
--- Quote from: Miguel Gimenez on October 22, 2025, 01:10:14 pm ---Code::Blocks is an IDE, any concerns related to compilers should be dealt with in their respective support pages.

--- End quote ---

Correct, but in this case it is an issue with the IDE not configuring the compiler settings correctly.

--- End quote ---
It is not a problem of IDE. In case of MinGW you need to have different installations for 32 and 64 bits compiler and select one you want to use in project.
C::B allows to have multiply targets in one project and build them with different compilers, but you have to configure it properly.

alfredo:

--- Quote from: nenin on October 23, 2025, 07:27:58 am ---
--- Quote from: alfredo on October 22, 2025, 10:35:38 pm ---
--- Quote from: Miguel Gimenez on October 22, 2025, 01:10:14 pm ---Code::Blocks is an IDE, any concerns related to compilers should be dealt with in their respective support pages.

--- End quote ---

Correct, but in this case it is an issue with the IDE not configuring the compiler settings correctly.

--- End quote ---
It is not a problem of IDE. In case of MinGW you need to have different installations for 32 and 64 bits compiler and select one you want to use in project.
C::B allows to have multiply targets in one project and build them with different compilers, but you have to configure it properly.

--- End quote ---

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.

Navigation

[0] Message Index

[#] Next page

Go to full version