PDA

View Full Version : Codelite g++ 64 bit compile



lucasart
November 19th, 2010, 06:49 PM
hello

i'm writing C++ code using codelite and g++ (installed CodeLite from the Ubuntu 10.10 repositries).

how do i compile the program for amd64 ?#

i tried to add -m64 to g++ -c command but it doesn't seem to work as sizeof(int) still equals 4.

thank you

Foxcow
November 19th, 2010, 07:00 PM
Not sure how from that ide but you can compile using the terminal and g++.


in the terminal



g++ thenameofyourprogram.cpp



If you're running on a 64 bit machine, it will be compiled as such. If I'm not mistaken... I'm relatively new to the game.

spjackson
November 19th, 2010, 07:12 PM
i tried to add -m64 to g++ -c command but it doesn't seem to work as sizeof(int) still equals 4.

On amd64, sizeof(int) is 4.

lucasart
November 19th, 2010, 11:36 PM
On amd64, sizeof(int) is 4.

thanks, i naively assumed it would be 8.

Arndt
November 19th, 2010, 11:45 PM
thanks, i naively assumed it would be 8.

sizeof(long) is probably 8, though.

Queue29
November 20th, 2010, 11:30 PM
sizeof(long) is probably 8, though.

Indeed it is. So is type long long.