On Wed, 01 Aug 2007 07:54:29 GMT, Erik Wikström
<Er***********@telia.comwrote in comp.lang.c++:
On 2007-08-01 08:06, Miroslaw Makowiecki wrote:
I have yourself c++ compiler about version of 4.3 it installed in a
catalog:/usr/lib/gcc-snapshot in system Debian.
libc6 version 2.6-5
For compilation of file about conntent,this below
it appear following error:
katusis@localhost:~$ /usr/lib/gcc-snapshot/bin/c++ -Wall tytan.cpp
In file included from tytan.cpp:10:
/usr/include/limits.h:125:26: error: no include path in which to search for
limits.h
You say to me what it's not bad and whow do this error repair?
//tytan.cpp
#define PACKAGE_NAME ""
#define PACKAGE_TARNAME ""
#define PACKAGE_VERSION ""
#define PACKAGE_STRING ""
#define PACKAGE_BUGREPORT ""
#define PACKAGE "kapt"
#define VERSION "1.0"
/* end confdefs.h. */
#ifdef __STDC__
# include <limits.h>
#else
# include <assert.h>
#endif
First of, you know that limits.h is not a C++ include file (it's C)?
Sorry, but that is incorrect. All 18 C95 standard headers are also
standard headers in C++. Including them as one does in C, with
<header.his deprecated by the C++ standard in favor of the <cheader>
form, it is still perfectly legal to include them with the C syntax.
The
standard C++ includes don't have a .h at the end so it would be just
<limitsif you wanted the C++ version.
Again, to include a C standard header in the preferred standard C++
manner, the preferred method would be <climitsinstead of <limits.h>,
but the original form is valid C++.
Also note that some standard C and standard C++ header names are
similar, so in C++:
#include <limitsincludes a C++ only header, but:
#include <climitsincludes the C header <limits.h>
....and
#include <stringincludes a C++ only header, but:
#include <cstringincludes the C header <string.h>
The preferred method for including standard C headers in C++ is based
on <cheaderplacing the C identifiers only in the std namespace,
whereas including them via <header.hputs the identifiers in both the
global and std namespaces.
In the particular case of <limits.hor <climits>, it makes absolutely
no difference at all, because the header only defines macros, and
macros are not scoped to namespaces.
As for your problem it seems that gcc is not set correctly, try asking
in gnu.gcc.help for more help on setting up gcc.
This, of course, is excellent advice. Another place the OP could try
is news:comp.os.linux.development.apps.
--
Jack Klein
Home:
http://JK-Technology.Com
FAQs for
comp.lang.c
http://c-faq.com/
comp.lang.c++
http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html