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

Windows 11: pointer size varies depending on computer

<< < (3/4) > >>

gd_on:

--- Quote ---I have to manually change the compiler from GCC to mingw64 only for the third machine?

For me this is strange. What could be the reason?
--- End quote ---

Probably (or May be), on your 3rd config, there was already a 32b compiler installed somewhere. So, when you installed C::B, it's installer has detected this compiler and configurated it as the default one, instead of the compiler distributed with C::B. This could explain why you had to change manually the configuration and why it compiled before your changes.

Krice:

--- Quote from: alfredo on October 22, 2025, 11:49:46 am ---If I manually force -m 64 on the first machine, I get sorry, unimplemented: 64-bit mode not compiled in..
--- End quote ---

The -m64 is not "manually forcing" anything, you set it to compile 64 bit programs. If the compiler doesn't support it you may get an error like that. Also, if you use sizeof properly the pointer size doesn't matter, whatever it might be.

alfredo:

--- Quote from: gd_on on October 23, 2025, 04:15:13 pm ---
--- Quote ---I have to manually change the compiler from GCC to mingw64 only for the third machine?

For me this is strange. What could be the reason?
--- End quote ---

Probably (or May be), on your 3rd config, there was already a 32b compiler installed somewhere. So, when you installed C::B, it's installer has detected this compiler and configurated it as the default one, instead of the compiler distributed with C::B. This could explain why you had to change manually the configuration and why it compiled before your changes.

--- End quote ---

I am sure that there is only codeblocks 25.03 mingw 64 bit version. I triple checked :)


--- Quote from: Krice on October 23, 2025, 05:42:03 pm ---
--- Quote from: alfredo on October 22, 2025, 11:49:46 am ---If I manually force -m 64 on the first machine, I get sorry, unimplemented: 64-bit mode not compiled in..
--- End quote ---

The -m64 is not "manually forcing" anything, you set it to compile 64 bit programs. If the compiler doesn't support it you may get an error like that. Also, if you use sizeof properly the pointer size doesn't matter, whatever it might be.

--- End quote ---

A 64 bit compiler on 64 bit OS should compile 64 bit binary by default.

nenin:

--- Quote from: alfredo on October 23, 2025, 09:39:27 pm ---I am sure that there is only codeblocks 25.03 mingw 64 bit version. I triple checked :)

--- End quote ---
You can switch on html logging and submit compiler logs here to figure out what compiler is used actually.

alfredo:

--- Quote from: nenin on October 24, 2025, 07:39:38 am ---
--- Quote from: alfredo on October 23, 2025, 09:39:27 pm ---I am sure that there is only codeblocks 25.03 mingw 64 bit version. I triple checked :)

--- End quote ---
You can switch on html logging and submit compiler logs here to figure out what compiler is used actually.

--- End quote ---

default GCC compiler

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

Cleaned "test - Debug"

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

g++.exe -Wall -fexceptions -m64 -g  -c C:\Users\user\test\main.cpp -o obj\Debug\main.o
g++.exe  -o bin\Debug\test.exe obj\Debug\main.o  -m64 
C:\Users\user\test\main.cpp:1:0: sorry, unimplemented: 64-bit mode not compiled in
 #include <iostream>
 ^
Process terminated with status 1 (0 minute(s), 0 second(s))
1 error(s), 0 warning(s) (0 minute(s), 0 second(s))
 
--- End code ---

minGW64 compiler


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

Cleaned "test - Debug"

-------------- Build: Debug in test (compiler: GNU GCC MinGW64 Compiler)---------------

g++.exe -Wall -fexceptions -m64 -g -IC:\mingw-w64\mingw64\include -I"C:\Program Files\CodeBlocks\MinGW\include" -c C:\Users\user\test\main.cpp -o obj\Debug\main.o
g++.exe -LC:\mingw-w64\mingw64\lib -L"C:\Program Files\CodeBlocks\MinGW\lib" -o bin\Debug\test.exe obj\Debug\main.o  -m64 
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))
--- End code ---

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version