Take the 2-minute tour ×
Raspberry Pi Stack Exchange is a question and answer site for users and developers of hardware and software for Raspberry Pi. It's 100% free, no registration required.

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.

2  
-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
3  
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 :-) –  tib20 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

3 Answers 3

up vote 2 down vote accepted

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

share|improve this answer
    
Yes, that's what I did. I downloaded the toolchains from the repo indicated in your article. Thanks! –  tib20 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

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