Code::Blocks Forums

User forums => General (but related to Code::Blocks) => Topic started by: alfredo on October 22, 2025, 11:49:46 am

Title: Windows 11: pointer size varies depending on computer
Post by: alfredo on October 22, 2025, 11:49:46 am
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;
}

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
Title: Re: Windows 11: pointer size varies depending on computer
Post by: 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.
Title: Re: Windows 11: pointer size varies depending on computer
Post by: alfredo on October 22, 2025, 10:35:38 pm
Code::Blocks is an IDE, any concerns related to compilers should be dealt with in their respective support pages.

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