Forums » C++ Framework » Ubuntu 64Bit »
| Nathan Hüsken | Ubuntu 64Bit | ||||
|---|---|---|---|---|---|
|
Added by Nathan Hüsken over 1 year ago
Hi, 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[...]". Thanks! |
||||
| Zhe Wang | RE: Ubuntu 64Bit | ||||
|
Added by Zhe Wang over 1 year ago
This pull request is to fix this error Enjoy Coding, Enjoy Life. |
||||
| Luke Guest | RE: Ubuntu 64Bit | ||||
|
Added by Luke Guest over 1 year ago
I also fixed this in my fork on github (same username), but Walzer told me "int was enough" :/ Luke. |
||||
| Minggo Zhang | RE: Ubuntu 64Bit | ||||
|
Added by Minggo Zhang over 1 year ago
No, the pull request can not work. It have no 64-bit libs. |
||||
| Leon Li | RE: Ubuntu 64Bit | ||||
|
Added by Leon Li over 1 year ago
64 bit libs are added to the pull request. Can you have a check? |
||||
| Leon Li | RE: Ubuntu 64Bit | ||||
|
Added by Leon Li over 1 year ago
But the other question I asked... Why we bundle those libs? Shouldn't we use those libs that comes with the OS? |
||||
| Minggo Zhang | RE: Ubuntu 64Bit | ||||
|
Added by Minggo Zhang over 1 year ago
Did the OS offers it? Or just use apt-get install to install it? But I agree with you if we can do it better. |
||||
| Minggo Zhang | RE: Ubuntu 64Bit | ||||
|
Added by Minggo Zhang over 1 year ago
Now I have only 32-bit ubuntu. |
||||
| Minggo Zhang | RE: Ubuntu 64Bit | ||||
|
Added by Minggo Zhang over 1 year ago
BTW, my pc is 64-bit. |
||||
| Leon Li | RE: Ubuntu 64Bit | ||||
|
Added by Leon Li over 1 year ago
I believe libfreetype, libcurl, libxml2, libpng and libjpeg can be installed using apt-get. However, I don't know where is libfmodex.so come from. I have not tried myself, but I believe you can install 64 bit ubuntu if your host is 64 bit. |
||||
| Leon Li | RE: Ubuntu 64Bit | ||||
|
Added by Leon Li over 1 year ago
I have also added 64 bit fmodex to the pull request. However, please note that fmodex is not free software, see www.fmod.org. I think in future, we should avoid using fmodex. |
||||
| Minggo Zhang | RE: Ubuntu 64Bit | ||||
|
Added by Minggo Zhang over 1 year ago
Yes, I agree with you. It is better if somebody has time to do the job: |
||||
| Luke Guest | RE: Ubuntu 64Bit | ||||
|
Added by Luke Guest over 1 year ago
No, I said I fixed the code. In my version, I changed the makefiles to remove hard coding but also used the system libs. But the code was right, which you said it wasn't. Luke. |
||||
| Leon Li | RE: Ubuntu 64Bit | ||||
|
Added by Leon Li over 1 year ago
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. |
||||
| Leon Li | RE: Ubuntu 64Bit | ||||
|
Added by Leon Li over 1 year ago
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. |
||||
| Minggo Zhang | RE: Ubuntu 64Bit | ||||
|
Added by Minggo Zhang over 1 year ago
Thank you, I have merged it. |
(1-15/15)