www.8devices.com
View unanswered posts | View active topics It is currently 12 May 2024, 23:00



Reply to topic  [ 8 posts ] 
 where is a C-Compiler 
Author Message

Joined: 02 Oct 2012, 06:56
Posts: 5
sorry, im a beginner.

where can i find a c-compiler in the current software respectively where can i download it and how do i install it?

thanks in advance
harry


02 Oct 2012, 07:02
Profile

Joined: 14 May 2012, 15:48
Posts: 196
You should start by reading up on compiling Linux.
I assume you're running Windows, otherwise you'd know where to find your compiler. So I suggest you setup a virtual machine with Linux for your compiling environment (much simpler and I doubt anyone here is compiling under Windows itself).
Linux comes with everything you need for Software development, which includes C/C++ compilers. Once you've got your Linux system setup you can follow the compiling tutorial in the Wiki.


02 Oct 2012, 08:12
Profile

Joined: 02 Oct 2012, 06:56
Posts: 5
Thanks NaYthan for your answer, i begin to understand.
i have a running linux system on a PC, not virtual, but i thought i have also a linux system on the carambola board and i can compile my software there.
i have to compile it on my Linux-PC and transfer it to my carambola board, right?
But there is a complete different hardware below, is the software running on my carambola after i had compiled it on my PC?
regards
Harry


02 Oct 2012, 08:23
Profile

Joined: 14 May 2012, 15:48
Posts: 196
Well yes, Carambola is running Linux, but with a meger 8MB harddrive and a mere 320MHz for processing you don't really wanna try to setup a development environment there (even though you could, if you added a big enough USB flash disk; but who want's to wait a day for the kernel to finish compiling?)
So what you do is called cross compiling. Compile your Software for the Carambola on a PC (so you're crossing hardware architectures with the compiler, hence cross compiling).


02 Oct 2012, 13:27
Profile

Joined: 02 Oct 2012, 06:56
Posts: 5
@NaYthan
thanks, now i know what to do
regards
Harry


02 Oct 2012, 14:56
Profile

Joined: 02 Oct 2012, 06:56
Posts: 5
me again

I installed cross-compiler on my linux system and found everything compiler, libraries...
I can read everywhere that i can build up a new image for my carambola,
but i only want to build up a single program like helloworld.

Is there somewhere a description how to build a single (small) program that runs on openwrt?
(like gcc ... hello.c -o hello)

thanks in advance
Harry


05 Oct 2012, 15:21
Profile

Joined: 04 Oct 2012, 11:57
Posts: 21
Hello Harry,

simply run:
./carambola/staging_dir/toolchain-mipsel_r2_gcc-4.7-linaro_uClibc-0.9.33.2/bin/mipsel-openwrt-linux-gcc hello.c -o hello

or take a look at the various howtos and examples in the openwrt forum.
F.ex: http://wiki.openwrt.org/doc/devel/crosscompile

Michael


06 Oct 2012, 08:50
Profile

Joined: 02 Oct 2012, 06:56
Posts: 5
How easy life can be!

thanks a lot Michael, it works.
That was exact the information i needed in the big amount of descriptions everywhere.

Regards
Harry


06 Oct 2012, 09:36
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 8 posts ] 

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron

Protected by Anti-Spam ACP Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.