Page 1 of 1

64 bit compiling issues

Posted: Sun Feb 03, 2008 9:27 pm
by marklapier
qcad will not build on 64 bit gcc. The issue is that the 'int' is 32 bits but the pointer is 64 bits. When the 64 bit 'int*' pointer is dereferenced to the 32 bit 'int' the compiler dies with this error message:

"engine/rs_layer.cpp:58: error: cast from ‘const RS_Layer*’ to ‘int’ loses precision"

I've read that this can be fixed by changing all the offending 'int' occurrences to 'long' instead.

If anyone has any better ideas let me know.

gcc version 4.1.2 20070925 (Red Hat 4.1.2-33)

Linux mushroom.patch 2.6.23.14-107.fc8 #1 SMP Mon Jan 14 22:07:11 EST 2008 x86_64 x86_64 x86_64 GNU/Linux

Posted: Mon Feb 04, 2008 5:32 pm
by janif
Fedora source rpm has patch for this.