nested #include and error : fatal error: map : No such file or directory

Dear All,
I wrote a multiple files program in C/C++ and create library.h and put all of *.h in library.h, Then #include "library.h" same the following code :
1
2
3
#ifndef LIBRARY_H_
    #include "library.h"
#endif 

My library.h is here:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#ifndef LIBRARY_H_
#define LIBRARY_H_

#include <map>
#include <fstream>
#include <string>
#include <string.h>
#include <cstdio>
#include <iostream>
#include <ncurses.h>
#include <stdlib.h>
//#include <termios.h>

using namespace std;

#include "structs.h"

#include "globals.h"
#include "typedef.h"


#include "readfile.h"
#include "writefile.h"
#include "tui.h"


#endif /* LIBRARY_H_ */ 

Please note that i get the following err:
fatal error: map: No such file or directory
and map is first #include file, i commented it, then map changed to fstream(next of map) When i remove #include "library.h" from tui.h everything is ok! tui.h is here:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#ifndef TUI_H_
#define TUI_H_
#ifndef LIBRARY_H_
    #include "library.h"
#endif

//#endif    LIBRARY_H_
//BEGIN_C_DECLS
    void print_menu(WINDOW *menu_win, int highlight);
    void menu();
//END_C_DECLS



#endif /* TUI_H_ */ 

How i solve it?
Make sure your include specifications (-I) contain the path to the STL libraries.
Oh, no, if i change first #include to for example cstdio err will be change to cstdio.no map.
Lets see the command line you're using to compile it.
Topic archived. No new replies allowed.