Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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 ?

share|improve this question

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.

-You could try xecdesign.com/qemu-emulating-raspberry-pi-the-easy-way I guess. Maybe you can overclok this virtual achine, should give a good boost. – Uwe Ziegenhagen Jan 22 '13 at 18:41
This might help: raspberrypi.stackexchange.com/q/1/40 – Jivings Jan 22 '13 at 18:43
QEMU looks easier to use than crosstools-ng, but I will keep it if I fail to use QEMU. Thank you Uwe Ziegenhagen and Jivings :-) – Tiwenty Jan 22 '13 at 19:00
There's a ready-to-roll cross-compiler for the RPi available here: raspberrypi.stackexchange.com/a/1144/4402 – Steven Devijver Jan 22 '13 at 23:35
This is called cross-compilation, and, as @Jivings points out, has already been answered in the post that he linked. – InkBlend Jan 23 '13 at 0:03
up vote 2 down vote accepted

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

Edit: Link is currently broken: PDF Mirror

share|improve this answer
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

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.

share|improve this answer

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

share|improve this answer
This is your site? – ppumkin Mar 12 '15 at 22:10

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