Author Topic: Hou to link include librarys  (Read 4569 times)

Nebojsa

  • Guest
Hou to link include librarys
« on: May 15, 2009, 06:49:14 pm »
Hi everyone!
First, i am sorry for asking a stuppid question. I am new code blocks user and dont now why my compiler does not recognized <iostream> library even if it exsiting in include directory. I use windows XP profesional, and GNU GCC Compiler.
if i try to compile code

#include <iostream>

int main(){
    char i;
    for(i=0; i<=255;i++) cout << i << endl;
}

i got a error message
"iostream: no such file or directory"

how can i set a route for include library?

thank for help

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7252
Re: Hou to link include librarys
« Reply #1 on: May 15, 2009, 07:01:11 pm »
That can happen if you try to compile a c-file instead of a c++-file.

What's the extension of the file you try to compile ?

Nebojsa

  • Guest
Re: Hou to link include librarys
« Reply #2 on: May 15, 2009, 07:29:07 pm »
YES, that was a problem! I have modified source file from c to cpp and problem disapeird.
Thanks for help and rapid answer, and forgive me for my potential bad english.