Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: bbt4jb on June 28, 2013, 08:16:46 am

Title: Error in code blocks
Post by: bbt4jb on June 28, 2013, 08:16:46 am
Good morning,
I'm trying to learn c language, but I get this error when compiling hello world program
Anyone can help me

#include<stdio.h>
int main(){
    //dentro de la funcion main
    //comentario:!!!!
    printf("Hola Youtube!");

    return 0;

THIS IS THE ERROR:

mingw32-gcc.exe    -c C:\Users\snake\Desktop\c\tut02.c -o C:\Users\snake\Desktop\c\tut02.o
mingw32-g++.exe  -o C:\Users\snake\Desktop\c\tut02.exe C:\Users\snake\Desktop\c\tut02.o  
Execution of 'mingw32-g++.exe  -o C:\Users\snake\Desktop\c\tut02.exe C:\Users\snake\Desktop\c\tut02.o' in 'C:\Users\snake\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\CodeBlocks' failed.
Nothing to be done (all items are up-to-date).
Title: Re: Error in code blocks
Post by: BlueHazzard on June 28, 2013, 09:01:22 am
hello,
check under Settings->Compiler->Global Compiler Settings->Toolchain executables->Program Files if the paths are correct...
What version of C:::B do you use? Did you installed the c;;b version with the compiler?

greetings

ps you are missing a "}" at the end of the code.
Title: Re: Error in code blocks
Post by: bbt4jb on June 28, 2013, 02:56:43 pm
Thanks for answering
I checked the path and it is this: c :/ Mingw
Is it right?
The version of code blocks is the latest that is available:
  codeblocks-12.11mingw-setup_user.exe
The  {  that I forgot to put in the error but the program is.
Thanks and regards
Title: Re: Error in code blocks
Post by: bbt4jb on June 28, 2013, 03:44:56 pm
Thanks

I saw that the path was not correct, a compiler apuntava I previously DOWNLOAD

I deleted the folder and have autodetected the compiler and it has taken me well

Thanks for everything

A greeting