Reputation: 444
I recently purchased a Raspberry Pi.
I wish to start writing code for it using either C or Python.
I know the differences between ARM vs x86 architecture, viz. RISC vs CISC, but what I don't know is that are there any special considerations on the actual code that I would need to write.
If I write my code on my desktop and compile it there, and then take the same code and compile on my Raspberry Pi, will it compile the same or would it break?
Upvotes: 2
Views: 5849
Reputation: 300
If you write code in python, it will work perfectly fine directly on both your desktop and the raspberry pi.
C, you'll have to recompile but that's about it. There might also be some issues if you start writing data structures to files directly and then using the same files across the different platforms -- you'll typically want to use a portable data format where the data is stored in strings (JSON, XML, or similar...)
Upvotes: 4