User forums > Help

Hou to link include librarys

(1/1)

Nebojsa:
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

Jenna:
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:
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.

Navigation

[0] Message Index

Go to full version