08/12/2017 1:05pm
RT @farscopecdt: @farscopecdt gives you the best possible start on your Robotics and Autonomous Systems research and innovation career, PhD…
29/11/2017 2:28pm
RT @DrARichards: How @farscopecdt student Katie got totally hooked on robotics [LINK]
28/11/2017 1:12pm
A quick overview of our Information-Cost-Reward framework - see how #robot #swarm #foraging performance can be disa… [LINK]
24/11/2017 5:11pm
RT @BristolRobotLab: APPLY NOW: Opportunity to join the FARSCOPE 4 year PhD programme in 2018, based here at the BRL [LINK]

[A small compiler script for C with GCC]

Added on 15/10/2012
Tags: C++

One of my favourite classes at the moment is the one where they teach us C. Knowing C already, it is a nice relaxation for Monday morning.

We usually build small C programs that one can compile straight from the command line. This involves calling the GCC compiler with some arguments and then running the program. I therefore built myself a small script that can do this automatically. It will run under Mac OS or Linux.

You can download the build.sh file and put it to a folder that contains your .c file. The script can then be used by running

./build.sh myFileName

where myFileName is name of the .c file without its extension.

The compiled program will be placed into a newly created 'build' folder and called myFileName.out by default. You can change the output file name by using

./build.sh myFileName myOutputFileName

where myOutputFileName is a file name without its extension.

{Please enable JavaScript in order to post comments}


Robot swarms in action

Watch e-puck robots collect resources and bring them back to base. While the previous simulation work helped us to learn a lot about the...

[read full]

How to compile code for e-puck robots on your computer

Compiling code natively on e-puck robots or cross-compiling on your computer can be very tedious. Luckily, there is a third option:...

[read full]

Coding for tomorrow: Why is good code important?

"Why should I care about how my code is written, as long as it works?" I will argue here that well-structured and well-written code not...

[read full]

How Coding in Python Might Be Bad For You

7 reasons why coding in Python is like writing a really bad essay and getting away with it

[read full]