<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic How to add path of header file in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802322#M99892</link>
    <description>Hi all,&lt;BR /&gt;i'm doing my first steps in C/C++ programmig.&lt;BR /&gt;I'd like to include in my program iostream.h but when i try to compile it cpp get me an error telling it wasn't able to find iostream.&lt;BR /&gt;I know the file is in /usr/local/include/c++/3.4.3/backward/iostream.h &lt;BR /&gt;How can I tell my compiler to look for iostream in this directory? It seems it look for it only in /usr/include&lt;BR /&gt;&lt;BR /&gt;I tried a thing like:&lt;BR /&gt;cc -I/usr/local/include/c++/3.4.3/backward/iostream.h myfile but without success.&lt;BR /&gt;&lt;BR /&gt;Is there any environment variable to set?&lt;BR /&gt;&lt;BR /&gt;Thank You&lt;BR /&gt;&lt;BR /&gt;Mauro</description>
    <pubDate>Thu, 08 Jun 2006 04:55:15 GMT</pubDate>
    <dc:creator>Mauro Gatti</dc:creator>
    <dc:date>2006-06-08T04:55:15Z</dc:date>
    <item>
      <title>How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802322#M99892</link>
      <description>Hi all,&lt;BR /&gt;i'm doing my first steps in C/C++ programmig.&lt;BR /&gt;I'd like to include in my program iostream.h but when i try to compile it cpp get me an error telling it wasn't able to find iostream.&lt;BR /&gt;I know the file is in /usr/local/include/c++/3.4.3/backward/iostream.h &lt;BR /&gt;How can I tell my compiler to look for iostream in this directory? It seems it look for it only in /usr/include&lt;BR /&gt;&lt;BR /&gt;I tried a thing like:&lt;BR /&gt;cc -I/usr/local/include/c++/3.4.3/backward/iostream.h myfile but without success.&lt;BR /&gt;&lt;BR /&gt;Is there any environment variable to set?&lt;BR /&gt;&lt;BR /&gt;Thank You&lt;BR /&gt;&lt;BR /&gt;Mauro</description>
      <pubDate>Thu, 08 Jun 2006 04:55:15 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802322#M99892</guid>
      <dc:creator>Mauro Gatti</dc:creator>
      <dc:date>2006-06-08T04:55:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802323#M99893</link>
      <description>Hi Mauro, &lt;BR /&gt;&lt;BR /&gt;You need to specify iostream.h in your source code like, &lt;BR /&gt;&lt;BR /&gt;# include &lt;IOSTREAM&gt; &lt;BR /&gt;&lt;BR /&gt;.... &lt;BR /&gt;&lt;BR /&gt;while compiling your code, you have to specify &lt;BR /&gt;&lt;BR /&gt;# cc -I/usr/local/include/c++/3.4.3/backward &lt;BR /&gt;&lt;YOUR program.c=""&gt; &lt;BR /&gt;&lt;BR /&gt;-Arun&lt;/YOUR&gt;&lt;/IOSTREAM&gt;</description>
      <pubDate>Thu, 08 Jun 2006 04:58:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802323#M99893</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-06-08T04:58:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802324#M99894</link>
      <description>For more information, refer this page &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.cs.cf.ac.uk/Dave/C/node3.html#SECTION00300000000000000000" target="_blank"&gt;http://www.cs.cf.ac.uk/Dave/C/node3.html#SECTION00300000000000000000&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Thu, 08 Jun 2006 05:02:23 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802324#M99894</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-06-08T05:02:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802325#M99895</link>
      <description>Thank you Arunvijai, &lt;BR /&gt;I misunderstood error message:&lt;BR /&gt;&lt;BR /&gt;Firs of all with include directive I have to specify header file with .h otherwise cpp give me an error like:&lt;BR /&gt;cpp: "prova1.c", line 3: error 4036: Can't open include file 'iostream'&lt;BR /&gt;then the error isn't in my .c file but it seems to be in iostream.h file because I get:&lt;BR /&gt;# cc prova1.c -I/usr/local/include/c++/3.4.3/backward&lt;BR /&gt;cpp: "/usr/local/include/c++/3.4.3/backward/iostream.h", line 32: error 4036: Can't open include file 'iostream'.&lt;BR /&gt;&lt;BR /&gt;Does Iostream include itself?&lt;BR /&gt;&lt;BR /&gt;I've no problem with stdio and other header files in /usr/include&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Jun 2006 05:12:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802325#M99895</guid>
      <dc:creator>Mauro Gatti</dc:creator>
      <dc:date>2006-06-08T05:12:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802326#M99896</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;I will check line 32 and see that is in there. cpp: "/usr/local/include/c++/3.4.3/backward/iostream.h", line 32: error 4036: Can't open include file 'iostream'. &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Thu, 08 Jun 2006 05:18:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802326#M99896</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-06-08T05:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802327#M99897</link>
      <description>I did it:&lt;BR /&gt;&lt;BR /&gt;# sed -n '32p' /usr/local/include/c++/3.4.3/backward/iostream.h&lt;BR /&gt;#include &lt;IOSTREAM&gt;&lt;BR /&gt;&lt;BR /&gt;It includes itself...&lt;BR /&gt;&lt;/IOSTREAM&gt;</description>
      <pubDate>Thu, 08 Jun 2006 05:25:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802327#M99897</guid>
      <dc:creator>Mauro Gatti</dc:creator>
      <dc:date>2006-06-08T05:25:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802328#M99898</link>
      <description>Can you comment that out and check you are able to compile ? &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Thu, 08 Jun 2006 05:34:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802328#M99898</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-06-08T05:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802329#M99899</link>
      <description>Yes, if I comment out this include directive I'm able to compile it without errors:&lt;BR /&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;//#include &lt;IOSTREAM.H&gt;&lt;BR /&gt;int main ()&lt;BR /&gt;{&lt;BR /&gt;printf("Ciao Bella!\n");&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;# cc prova1.c                                        &lt;BR /&gt;/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (prova1.o) was detected. The linked output may not run on a PA 1.x system.&lt;BR /&gt;&lt;BR /&gt;&lt;/IOSTREAM.H&gt;&lt;/STDIO.H&gt;</description>
      <pubDate>Thu, 08 Jun 2006 06:31:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802329#M99899</guid>
      <dc:creator>Mauro Gatti</dc:creator>
      <dc:date>2006-06-08T06:31:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802330#M99900</link>
      <description>Thats cool. You can compile with +DA1.1 to avoid warnings about PA-RISC2.0 objects. &lt;BR /&gt;&lt;BR /&gt;-Arun</description>
      <pubDate>Thu, 08 Jun 2006 06:36:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802330#M99900</guid>
      <dc:creator>Arunvijai_4</dc:creator>
      <dc:date>2006-06-08T06:36:01Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802331#M99901</link>
      <description>Thank you for the hint +DA1.1!&lt;BR /&gt;&lt;BR /&gt;It continues to be strange the iostream problem :-)</description>
      <pubDate>Thu, 08 Jun 2006 06:38:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802331#M99901</guid>
      <dc:creator>Mauro Gatti</dc:creator>
      <dc:date>2006-06-08T06:38:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802332#M99902</link>
      <description>At the end I think there is a problem with iostream.h&lt;BR /&gt;&lt;BR /&gt;I tried to use gcc instead of cc.&lt;BR /&gt;Well here there are the results:&lt;BR /&gt;&lt;BR /&gt;# gcc -x c prova1.c -I/usr/local/include/c++/3.4.3/backward  &lt;BR /&gt;In file included from prova1.cpp:2:&lt;BR /&gt;/usr/local/include/c++/3.4.3/backward/iostream.h:32:20: iostream: No such file or directory&lt;BR /&gt;In file included from prova1.cpp:2:&lt;BR /&gt;/usr/local/include/c++/3.4.3/backward/iostream.h:34: error: parse error before "std"&lt;BR /&gt;&lt;BR /&gt;# gcc -x c++ prova1.cpp -I/usr/local/include/c++/3.4.3/backward&lt;BR /&gt;In file included from /usr/local/include/c++/3.4.3/backward/iostream.h:31,&lt;BR /&gt;                 from prova1.cpp:2:&lt;BR /&gt;/usr/local/include/c++/3.4.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the &lt;X&gt; header for the &lt;X.H&gt; header for C++ includes, or &lt;IOSTREAM&gt; instead of the deprecated header &lt;IOSTREAM.H&gt;. To disable this warning use -Wno-deprecated.&lt;BR /&gt;/usr/ccs/bin/ld: (Warning) At least one PA 2.0 object file (/var/tmp//cc1Tfudc.o) was detected. The linked output may not run on a PA 1.x system.&lt;BR /&gt;/usr/ccs/bin/ld: Unsatisfied symbols:&lt;BR /&gt;   std::ios_base::Init::~Init()(code)&lt;BR /&gt;   std::ios_base::Init::Init()(code)&lt;BR /&gt;   std::basic_string&lt;CHAR&gt;, std::allocator&lt;CHAR&gt; &amp;gt;::size() const(code)&lt;BR /&gt;   std::basic_string&lt;CHAR&gt;, std::allocator&lt;CHAR&gt; &amp;gt;::operator[](unsigned long) const(code)&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;&lt;/CHAR&gt;&lt;/CHAR&gt;&lt;/CHAR&gt;&lt;/CHAR&gt;&lt;/IOSTREAM.H&gt;&lt;/IOSTREAM&gt;&lt;/X.H&gt;&lt;/X&gt;</description>
      <pubDate>Thu, 08 Jun 2006 06:47:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802332#M99902</guid>
      <dc:creator>Mauro Gatti</dc:creator>
      <dc:date>2006-06-08T06:47:38Z</dc:date>
    </item>
    <item>
      <title>Re: How to add path of C++ header file</title>
      <link>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802333#M99903</link>
      <description>&lt;P&gt;&amp;gt;I'd like to include in my program iostream.h but when I try to compile it cpp gives me an error telling it wasn't able to find iostream.&lt;BR /&gt;&lt;BR /&gt;You can't use iostream in C. So switching to g++ or aCC is the correct direction. You may want to use .C as a suffix to indicate the source is C++.&lt;BR /&gt;&lt;BR /&gt;&amp;gt;At the end I think there is a problem with iostream.h&lt;BR /&gt;&lt;BR /&gt;There isn't anything wrong with &amp;lt;iostream.h&amp;gt; except that the standard file name is &amp;lt;iostream&amp;gt;.&amp;nbsp; g++ is allowing you to use &amp;lt;iostream.h&amp;gt; by having it include the official file &amp;lt;iostream&amp;gt;. It seems your final problem with unsats shows you are missing a g++ library?&lt;/P&gt;</description>
      <pubDate>Sun, 13 Nov 2011 02:50:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/how-to-add-path-of-header-file/m-p/3802333#M99903</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2011-11-13T02:50:05Z</dc:date>
    </item>
  </channel>
</rss>

