Author Topic: Error when building  (Read 3771 times)

Offline Cheshire

  • Single posting newcomer
  • *
  • Posts: 3
Error when building
« on: February 28, 2009, 01:10:27 am »
Operating System: Windows Vista

The error returned from trying to build my Hello world! program is this when I click build-

C:\Program Files\CodeBlocks\Hello world.cpp:1:20: no include path in which to search for iostream

Offline ollydbg

  • Developer
  • Lives here!
  • *****
  • Posts: 5916
  • OpenCV and Robotics
    • Chinese OpenCV forum moderator
Re: Error when building
« Reply #1 on: February 28, 2009, 02:48:28 am »
Welcome to this forum!

Which version of Code::Blocks? Which Compiler?

Why to use a file named HelloWorld.cpp  or Hello_World.cpp. :D
If some piece of memory should be reused, turn them to variables (or const variables).
If some piece of operations should be reused, turn them to functions.
If they happened together, then turn them to classes.

Offline Cheshire

  • Single posting newcomer
  • *
  • Posts: 3
Re: Error when building
« Reply #2 on: February 28, 2009, 06:32:00 am »
Welcome to this forum!

Which version of Code::Blocks? Which Compiler?

Why to use a file named HelloWorld.cpp  or Hello_World.cpp. :D

Ah yes, sorry.

Compiler: Default (i think this is the GNU CCC Compiler or something like that)
Version: 8.02
I used Helloworld.cpp as a test file to see if it would work.

Code
C:\Program Files\CodeBlocks\Hello world.cpp|1|no include path in which to search for iostream|
C:\Program Files\CodeBlocks\Hello world.cpp||In function `int main()':|
C:\Program Files\CodeBlocks\Hello world.cpp|5|error: `cout' was not declared in this scope|
||=== Build finished: 2 errors, 0 warnings ===|
« Last Edit: March 01, 2009, 12:45:45 am by Cheshire »

Offline Cheshire

  • Single posting newcomer
  • *
  • Posts: 3
Re: Error when building
« Reply #3 on: March 06, 2009, 11:57:09 pm »
o.o