DiscussionsIssue archiveOther usage issues

Archived discussion

Standard_Integer too small on x86_64...

Other usage issuesThu, 01/03/2008 - 02:007 replies

Browse this forum
QuestionAuthor

Hi all,

I've been struggling with compiling OCC on 64bit Ubuntu for a few days and finally made serious headway after applying Jason Kraftcheck's patches ( http://www.opencascade.org/org/forum/thread_12563/ .) Unfortunately I've run into these 2 instances (so far) of void pointers being cast as standard ints in OCC. Here are the errors I got after 3 hours of compilation:

../../../src/Draw/Draw_VariableCommands.cxx: In function 'char* tracevar(void*, Tcl_Interp*, char*, char*, Standard_Integer)':
../../../src/Draw/Draw_VariableCommands.cxx:661: error: cast from 'void*' to 'Standard_Integer' loses precision
../../../src/Draw/Draw_VariableCommands.cxx: In static member function 'static Handle_Draw_Drawable3D Draw::Get(char*&, Standard_Boolean)':
../../../src/Draw/Draw_VariableCommands.cxx:776: error: cast from 'void*' to 'Standard_Integer' loses precision

Does anyone know a definitive fix for this issue? Why have other 64 bit users not encountered the same problem? Thanks in advance for any advice!

-Seth

Discussion

7 archived replies

Posts are displayed in their archived order.

01Commenter-1

It does look like a bug as far I can see, they try to convert a void* (64 bits) to a Standard_Integer (32 bits says the OCC doc) and that will not work.

02Author

is this something people out there have fixed before? it seems to me that anyone with a 64bit build would have run into this.

03Author

so, i just changed them.

04Commenter-2

Maybe these should be Standard_Address (which is typedef void*) instead of Standard_Integer's.

05Author

that makes sense. i used longs, because on my system they're 64 bit, which isn't a good solution, but it worked.

06Commenter-3

Anybody compared the performance of 64 - bit and 32 bit version
on a common h/w platform .. r there any bench mark results ?

07Commenter-4

I'm going to try to mark useful posts that have patches provided like so

OCCPATCH

so I can find them later for my patch repository using the forum search function. Hope nobody minds.

Pete