User forums > Help
C::B won't build my C++ file
iamunited:
--- Code: ---nevertheless, I am still missing a lot important information:
- What C::b version,
- what compiler version,
- what's the EXACT full compiler log?
--- End code ---
1) What C::B Version?
I have version 8.02 MinGW
2) What Compiler Version
I am not sure what Compiler Version I have, where do I find that I will tell you it.
3) What's the EXACT full Compiler Log
I am going to assume this is what your asking for.
GNU GCC Compiler
Microsoft Visual C++ Toolkit 2003
Microsoft Visual C++ 2005/2008
Borland C++ Compiler (5.5, 5.82)
Digital Mars Compiler
OpenWatcom (W32) Compiler
GNU GCC Compiler for MSP430
Cygwin GCC
Intel C/C++ Compiler
SDCC Compiler
Tiny C Compiler
GDC D Compiler
Digital Mars D Compiler
GNU ARM GCC Compiler
GNU AVR GCC Compiler
GNU GCC Compiler for PowerPC
GNU GCC Compiler for Tricore
It finally tried to build and run
Here is the latest action.....Errors everywhere but not sure why
My Code:
--- Code: ---#include <iostream>
using namespace std;
int main()
{
cout << "Hello World" << endl;
}
--- End code ---
Here are the errors:
--- Code: ---C:\Users\Brent\Desktop\Untitled1.c|1|iostream: No such file or directory|
C:\Users\Brent\Desktop\Untitled1.c|2|error: syntax error before "namespace"|
C:\Users\Brent\Desktop\Untitled1.c|2|error: ISO C forbids data
definition with no type or storage class|
C:\Users\Brent\Desktop\Untitled1.c||In function `main':|
C:\Users\Brent\Desktop\Untitled1.c|5|error: `cout' undeclared (first use in this function)|
C:\Users\Brent\Desktop\Untitled1.c|5|error: (Each undeclared identifier is reported only once|
C:\Users\Brent\Desktop\Untitled1.c|5|error: for each function it appears in.)|
C:\Users\Brent\Desktop\Untitled1.c|5|error: `endl' undeclared (first use in this function)|
||=== Build finished: 7 errors, 0 warnings ===|
--- End code ---
stahta01:
TURN ON FULL LOGGING
Logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
iamunited:
--- Quote from: stahta01 on January 29, 2010, 04:22:30 am ---TURN ON FULL LOGGING
Logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
--- End quote ---
Full Logging has been turned on since your first post telling me to.
Jenna:
Your sourc-file is named Untitled1.c, C::B treats is a C-file not as C++ !!!
That can not work, make sure the file-ending is cpp if you create a C++ file.
You can also force C::B to use g++ instead of gcc, but this is more difficult and hackky and might lead to later errors.
MortenMacFly:
--- Quote from: jens on January 29, 2010, 07:00:24 am ---Your sourc-file is named Untitled1.c, C::B treats is a C-file not as C++ !!!
--- End quote ---
--- Quote from: MortenMacFly on January 28, 2010, 08:05:31 pm ---Could it be that you are trying to compile a C++ application with a file extension *.c? This won't work.
--- End quote ---
How often do you want to be advised? Please react accordingly.
Topic locked so we don't waste more time here.
Navigation
[0] Message Index
[*] Previous page
Go to full version