I am trying to build cocos2d-x under ubuntu 11.10 64Bit. I get the error:
../tileMap_parallax_nodes/CCTMXLayer.cpp: In member function ‘unsigned int cocos2d::CCTMXLayer::atlasIndexForExistantZ(unsigned int)’:
../tileMap_parallax_nodes/CCTMXLayer.cpp:399:21: error: cast from ‘int*’ to ‘int’ loses precision
../tileMap_parallax_nodes/CCTMXLayer.cpp:399:53: error: cast from ‘void**’ to ‘int’ loses precision
../tileMap_parallax_nodes/CCTMXLayer.cpp: In member function ‘unsigned int cocos2d::CCTMXLayer::atlasIndexForNewZ(int)’:
../tileMap_parallax_nodes/CCTMXLayer.cpp:408:45: error: cast from ‘void*’ to ‘int’ loses precision
../tileMap_parallax_nodes/CCTMXLayer.cpp: In member function ‘virtual void cocos2d::CCTMXLayer::removeChild(cocos2d::CCNode*, bool)’:
../tileMap_parallax_nodes/CCTMXLayer.cpp:475:70: error: cast from ‘void*’ to ‘unsigned int’ loses precision
I am guessing, this is because I am on a 64Bit machine and cocos2d-x can not (yet?) be compiled for 64Bit.
Now I do not really understand what in the lines listed above happens. But it has all to do with explicit converting “m_pAtlasIndexArray->arr[…]”.
Can this be made 64Bit compatible? Are there any other difficulties expected for 64Bit?
Now I have only 32-bit ubuntu.
I have downloaded 64-bit, but my vmware is 32-bit.
I don’t know if I can install 64-bit ubuntu on 32-bit vmware.
I will try it.
I think Luke may have some important points. I thought that there is no pointer converted to int values. Only “index” was converted to int values. I will re-exam the source see if it is this case.
I have re-examed the patch. I think it is quite safe to use int values there because those int values are the indexes into the array not a pointer value.