6

This question already has an answer here:

Since I got my RPi, I have been playing with it and I am really happy that I bought it!

I use various programs on it but it takes a long time to build them. So I had an idea. What if I could build my programs on my quad-core PC, it will be a lot faster!? ^^

Is there a way to build my programs on Windows or Debian on my PC for my RPi ?

marked as duplicate by Jivings Mar 5 '13 at 22:33

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

2

This may help you, he explained it very nicely:
Development environment raspberry cross compiler

Edit: Link is currently broken: PDF Mirror

  • Yes, that's what I did. I downloaded the toolchains from the repo indicated in your article. Thanks! – Tiwenty Jan 29 '13 at 5:23
2

I just gave an answer to a similar question here:

Can I use my Ubuntu desktop to cross-compile the GO language environment for my Pi?

NB. I'm not Frepa ;)

To summarize, yes it is, but building a cross-compiler is not a trivial task for most people; I recently used crosstool-NG to do it which A) made the procedure pretty painless, B) produced a c/c++ compiler that works to compile executables for the pi.

If you just want this to build your own stuff then I do recommend it if the caveats I mentioned there about use of autotools and pkg-config do not apply or you are willing to deal with the hassles to make that happen (dealing with those hassles may take you longer than just compiling on the pi, so...).

Crosstool-ng can produce a basic environment in which you can compile programs that rely on the standard libraries + POSIX threading (that's what I tested successfully). Beyond that, you have to build any support libraries you use (sqlite, curl, ncurses, etc.) in that environment first too.

2

You can build Raspberry Pi cross-compiler running on Windows by using MinGW, Cygwin and some patches from Raspbian repository, here is an instruction how to do it: http://www.gurucoding.com/en/rpi_cross_compiler/index.php

  • This is your site? – Piotr Kula Mar 12 '15 at 22:10

Not the answer you're looking for? Browse other questions tagged or ask your own question.