Code::Blocks Forums

User forums => Help => Topic started by: Star on August 13, 2009, 09:59:53 am

Title: Build Fail
Post by: Star on August 13, 2009, 09:59:53 am
I just installed codeblocks-8.02mingw for windows xp and created a new project. I attempted to run the main.cpp code as a test but when i clicked build i recieved the following error message:


-------------- Build: Debug in Project ---------------

Compiling: main.cpp
Execution of 'mingw32-g++.exe -Wall -fexceptions  -g     -c "C:\Documents and Settings\Starshine\My Documents\Project\main.cpp" -o obj\Debug\main.o' in 'C:\Documents and Settings\Starshine\My Documents\Project' failed.
Nothing to be done.


I've tried uninstalling codeblocks-8.02mingw and getting it without mingw (as was recommended by several people) but the error remained unchanged. Please assist.
Title: Re: Build Fail
Post by: vivi on August 25, 2009, 02:39:21 pm
i cant build too.even worse no response at all.pls guide and help me.some kind soul pls this is urgent as i need to hand it up soon.
/*This programme adds 2 integers.*/
# icnlude <stdio.h>

int main (void)
{ int number1,number2,sum;
  number1=20
  number2=25
  sum+number1+number2;
  printf("The sum of %d and %d is %d.",number1,number2,sum);
  return 0
}
Title: Re: Build Fail
Post by: blueshake on August 25, 2009, 03:23:44 pm
Code
number1=20
  number2=25
  sum+number1+number2;
  printf("The sum of %d and %d is %d.",number1,number2,sum);
  return 0
; missed.
Title: Re: Build Fail
Post by: vivi on August 26, 2009, 04:34:38 am
/*This programm adds two integers.*/
#include<stdio.h>

int main(void)
{  int number1,number2,sum;
   number1=20;
   number2=25;
   sum=number1+number2;
   printf("The sum of %d and %d is %d.",number1,number2,sum);
   return 0;
}
But even after i put; still cannot build.
Is it go to file click new click empty file ,then key in the above.
After that save it as c++ file.But when i click the build button nothing happen??the blue circle button.Then i click run but they say my file is not build yet??But how to build??


Pls guide..thanks for yr prompt reply.
Title: Re: Build Fail
Post by: blueshake on August 26, 2009, 07:12:24 am
everything is ok.
see my attachment.
i think you need create a new console project not only a file.


[attachment deleted by admin]
Title: Re: Build Fail
Post by: vivi on August 26, 2009, 12:58:15 pm
How to create a new project, then got so many category ,so must choose what?Thanks.
Can tell me step by step how u get the final picture that u attach?.First click on what a not ?Thanks.I feel so stupid....
Title: Re: Build Fail
Post by: blueshake on August 26, 2009, 01:24:54 pm
start the cb, you will see the attachment.
create a new project,choose the console
application.and next step.


[attachment deleted by admin]
Title: Re: Build Fail
Post by: vivi on August 26, 2009, 02:43:33 pm
Hi, but after that the screen is grey in colour.I cant type anything.
Title: Re: Build Fail
Post by: blueshake on August 26, 2009, 02:47:18 pm
from this ,I can guess you are very new to cb.
see my attachment.click the + before souce
and click the main.cpp file.

[attachment deleted by admin]
Title: Re: Build Fail
Post by: blueshake on August 26, 2009, 02:49:51 pm
you can read document to know more about  cb.http://www.codeblocks.org/docs/main_codeblocks_en.html (http://www.codeblocks.org/docs/main_codeblocks_en.html)
Title: Re: Build Fail
Post by: vivi on August 26, 2009, 02:53:51 pm
how?u are online?
Title: Re: Build Fail
Post by: vivi on August 26, 2009, 03:01:07 pm
hi,
after that, i typed

/*This programme adds 2 integers.*/
# include <stdio.h>
 
int main (void)
{ int number1,number2,sum;
  number1=20
  number2=25
  sum=number1+number2;
  printf("The sum of %d and %d is %d.",number1,number2,sum);
  return 0
}

Then i click the blue circle symbol, build, then become like that already...how come cannot get what u show me the exe
"ntu - Debug" uses an invalid compiler [YOUR ANSWER IS ALREADY THERE. SEARCH THE FORUMS!]. Skipping...
Nothing to be done.
Title: Re: Build Fail
Post by: vivi on August 26, 2009, 03:04:56 pm
yes, im new totally new.im not studying computer engineering but still must learn this course .=(WHAT THE....
thanks for yr help.
Title: Re: Build Fail
Post by: blueshake on August 26, 2009, 03:16:41 pm
you can down cb8.02 with mingw.try again.
Title: Re: Build Fail
Post by: Ancient Dragon on August 28, 2009, 05:20:29 pm
What is this thread??? some kind of joke?  :x  Its been hijacked so many times I'm supprised the mods have not deleted it.  No one has yet to answer the original poster's question (I have the same problem so that's why I'm here.).