REMI : In this video, I'm going to show you how to compile a C program into an executable binary and how to execute that binary. So here on WebLinux, by default, when you open it the first time, you'll have a simple C program, the "hello world program". It's a very basic program that just prints "hello world" into the screen with a printf statement here. So this is the C source code into the file program.c So if we go to the File Browser, we can see that I have program.c in my home directory. And I want to compile it first and then execute it when I have the binary that is generated by the compilation process. So at the bottom of the Code editor, you have two lines, the build command. This is the command to type in order to compile the C source code and create a binary. So here, you can read the long comment here. But what's important here to understand is that the command is GCC. So this is the Gnu C compiler. You have a lot of options here, and we won't go into the details. But here, you have the C program that you want to compile. So this is the C source code. And you have an option, dash o, -o which is the name of the binary output. So o stands for output, and the name of the binary will be program And here, the second line is the execution line : exec. So on the terminal, what would you have to type to execute that program that was just created? Well, because it is created in the current directory, it will be ./ meaning that it is in the current directory, and I want to execute the binary that is named program And this is what's happening when you click the Run It button on WebLinux. So it will first generate the binary with the first command, and when it is done, it will execute it with a second command here. So let's try to push this button and see what happens. So first, it is compiling program.c, outputting program as a binary. OK. And second, it is clearing the screen and then executing program. And indeed, we have "hello world" in the screen. So it just happened that it was compiled, and it was executed. Of course, it is an automated process, but you can change here the command lines to build and to execute the program. Let's see how to do that with a second program. What I will do first is list all the files that are in my home directory now. You see that you have a new file that is called program, and it is indeed the binary that was created during the compilation process. If we use the file command to see the type of the files, of course we will see that program.c is a C source file and coded into ASCII text. And the program is an executable. So it's a binary that can be executed into an OpenRISC processor using 32-bit processor. So this is exactly the processor that is running WebLinux right now. All right. What if we have another program? So let's try to copy program.c into otherprogram.c. And here, if I list, I have otherprogram.c in the file browser. I can open it. I need the Code Editor. Here, you will have a little bug that is on WebLinux. I will try to fix it in some way some day. But first, you can delete that if you want, but it doesn't matter anyway. And here, what you have to understand is that you have otherprogram.c that is open in the Code Editor, but it didn't change the Build command in the execution program and the execution command. So you have to change it manually here. You have to change the name of the C source file here. So we have to put otherprogram.c, and it's an output. I don't want to override the program that is already existing here. I want to create another one. So let's change the name also here to otherprogram. And of course, if you want to execute otherprogram, then you have to change the name also here -- otherprogram -- otherwise it will execute the old one just here. Well, let's try to run it so it will build the second program and execute it. As you can see here, you'll have ./otherprogram You also see that the compiler has one warning, if you click on this little text here, that on the line number 8, there is a new character that is ignored. And that is a warning. And indeed, this is the line that is just here with some red dots here. And that appears to be a bug on WebLinux that I am trying to fix. So what I do usually is I just erase that, and I run it again. And that happens when you copy some files on WebLinux. So I'm trying to improve WebLinux every day when I have time and skills to do that. I am searching for anybody that can help into this open source project to improve it. So you are welcome to contact the team to improve and participate in this big WebLinux project to improve it anyway. So when you click the Run It button, it will also save the current opened program. So it is the same as clicking first the Save It and then the Run It. All right. So you know how to compile and run a program or another program by changing the command lines addressed here using WebLinux. So you can try by yourself now.