472,782 Members | 1,474 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,782 software developers and data experts.

c++ compile error on linux 64 bit machine

hi,
Here is my code
#include <iostream.h>
int main()
{
cout <<"HI";
return 0;
}
and using following command to compile a C++ program
g++ ex1.cpp -o ex1

and errors are
In file included from ex1.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:44:28:
bits/c++config.h: No such file or directory
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:44,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex1.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iosfwd:46:29:
bits/c++locale.h: No such file or directory
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iosfwd:47:25:
bits/c++io.h: No such file or directory
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:46,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex1.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:
In static member function `static typename
__gnu_cxx::_Char_types<_CharT>::int_type
__gnu_cxx::char_traits<_CharT>::eof()':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:139:
error: `EOF' undeclared (first use this function)
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:139:
error: (Each undeclared identifier is reported only once for each
function it appears in.)
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:
In static member function `static int std::char_traits<char>::eof()':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:291:
error: `EOF' undeclared (first use this function)
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex1.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:33:30:
bits/atomic_word.h: No such file or directory
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex1.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:
At global scope:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:39:
error: expected constructor, destructor, or type conversion before
"__exchange_and_add"
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:39:
error: expected `,' or `;' before "__exchange_and_add"
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:43:
error: expected `,' or `...' before '*' token
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/memory:55,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/string:48,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/locale_classes.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex1.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:52:31:
bits/c++allocator.h: No such file or directory
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/memory:55,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/string:48,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/locale_classes.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex1.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:80:
error: expected template-name before '<' token
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:80:
error: expected `{' before '<' token
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:80:
error: expected unqualified-id before '<' token
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:80:
error: expected `;' before '<' token
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/string:53,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/locale_classes.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex1.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:148:
error: `_Atomic_word' does not name a type
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `void std::basic_string<_CharT, _Traits,
_Alloc>::_Rep::_M_dispose(const _Alloc&)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:217:
error: `__exchange_and_add' is not a member of `__gnu_cxx'
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `typename _Alloc::size_type
std::basic_string<_CharT, _Traits, _Alloc>::_M_check(typename
_Alloc::size_type, const char*) const':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:290:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:290:
error: (if you use `-fpermissive', G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `typename _Alloc::const_reference
std::basic_string<_CharT, _Traits, _Alloc>::at(typename
_Alloc::size_type) const':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:662:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `typename _Alloc::reference
std::basic_string<_CharT, _Traits, _Alloc>::at(typename
_Alloc::size_type)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:681:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::_M_replace_aux(typename
_Alloc::size_type, typename _Alloc::size_type, typename
_Alloc::size_type, _CharT)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:1359:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available

How to solve those errors?

Mar 16 '06 #1
5 5560
cr**********@gmail.com writes:
hi,
Here is my code
#include <iostream.h>
int main()
{
cout <<"HI";
return 0;
}
Why don't you start with the following program 'ex0.cpp'?

[[[
#include <iostream>
int main()
{
std::cout <<"HI";
return 0;
}
]]]
[...Errors...]
How to solve those errors?


I recommend you try out 'ex0.cpp'.

HTH

Mar 16 '06 #2
Hello,
I did what u said and following are the results=>
g++ ex0.cpp -o ex0
errors=>
In file included from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:44:28:
bits/c++config.h: No such file or directory
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:44,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iosfwd:46:29:
bits/c++locale.h: No such file or directory
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iosfwd:47:25:
bits/c++io.h: No such file or directory
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:46,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:
In static member function `static typename
__gnu_cxx::_Char_types<_CharT>::int_type
__gnu_cxx::char_traits<_CharT>::eof()':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:139:
error: `EOF' undeclared (first use this function)
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:139:
error: (Each undeclared identifier is reported only once for each
function it appears in.)
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:
In static member function `static int std::char_traits<char>::eof()':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/char_traits.h:291:
error: `EOF' undeclared (first use this function)
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:33:30:
bits/atomic_word.h: No such file or directory
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:
At global scope:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:39:
error: expected constructor, destructor, or type conversion before
"__exchange_and_add"
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:39:
error: expected `,' or `;' before "__exchange_and_add"
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/atomicity.h:43:
error: expected `,' or `...' before '*' token
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/memory:55,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/string:48,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/locale_classes.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:52:31:
bits/c++allocator.h: No such file or directory
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/memory:55,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/string:48,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/locale_classes.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:80:
error: expected template-name before '<' token
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:80:
error: expected `{' before '<' token
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:80:
error: expected unqualified-id before '<' token
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/allocator.h:80:
error: expected `;' before '<' token
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/string:53,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/locale_classes.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:148:
error: `_Atomic_word' does not name a type
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `void std::basic_string<_CharT, _Traits,
_Alloc>::_Rep::_M_dispose(const _Alloc&)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:217:
error: `__exchange_and_add' is not a member of `__gnu_cxx'
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `typename _Alloc::size_type
std::basic_string<_CharT, _Traits, _Alloc>::_M_check(typename
_Alloc::size_type, const char*) const':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:290:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:290:
error: (if you use `-fpermissive', G++ will accept your code, but
allowing the use of an undeclared name is deprecated)
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `typename _Alloc::const_reference
std::basic_string<_CharT, _Traits, _Alloc>::at(typename
_Alloc::size_type) const':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:662:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `typename _Alloc::reference
std::basic_string<_CharT, _Traits, _Alloc>::at(typename
_Alloc::size_type)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:681:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:
In member function `std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::_M_replace_aux(typename
_Alloc::size_type, typename _Alloc::size_type, typename
_Alloc::size_type, _CharT)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.h:1359:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
In file included from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/string:57,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/locale_classes.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/ios_base.h:47,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ios:49,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/ostream:45,
from
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:45,
from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:
In static member function `static _CharT* std::basic_string<_CharT,
_Traits, _Alloc>::_S_construct(_InIterator, _InIterator, const _Alloc&,
std::forward_iterator_tag)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:145:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:
In member function `std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::assign(const _CharT*,
typename _Alloc::size_type)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:269:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:
In member function `std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::insert(typename
_Alloc::size_type, const _CharT*, typename _Alloc::size_type)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:296:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:
In member function `std::basic_string<_CharT, _Traits, _Alloc>&
std::basic_string<_CharT, _Traits, _Alloc>::replace(typename
_Alloc::size_type, typename _Alloc::size_type, const _CharT*, typename
_Alloc::size_type)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:333:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:
In member function `void std::basic_string<_CharT, _Traits,
_Alloc>::reserve(typename _Alloc::size_type)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:430:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:
In static member function `static typename std::basic_string<_CharT,
_Traits, _Alloc>::_Rep* std::basic_string<_CharT, _Traits,
_Alloc>::_Rep::_S_create(typename _Alloc::size_type, typename
_Alloc::size_type, const _Alloc&)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:476:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:
In member function `void std::basic_string<_CharT, _Traits,
_Alloc>::resize(typename _Alloc::size_type, _CharT)':
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/bits/basic_string.tcc:576:
error: there are no arguments to `__N' that depend on a template
parameter, so a declaration of `__N' must be available

Mar 16 '06 #3
>> Why don't you start with the following program 'ex0.cpp'?

[[[
#include <iostream>
int main()
{
std::cout <<"HI";
return 0;
}
]]]
I did what u said and following are the results=>
Who's u? ;-)
g++ ex0.cpp -o ex0 errors=>
In file included from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:44:28:
bits/c++config.h: No such file or directory
[...]


I tried the same on my platform and get the expected:

[[[
cd /home/mw/prog/c++/tmp/
make ex0
g++ ex0.cpp -o ex0

Compilation finished at Thu Mar 16 07:40:09
]]]

[[[
~/prog/c++/tmp $ ./ex0
HI~/prog/c++/tmp $
]]]

So I think it's time for you to solve the
platform-specific problem you have. This group is not
the place for that. I recommend you to get creative
now. Try e.g. the redhat documentation, gcc-groups and
have a look in the internet ;-).
HTH

Mar 16 '06 #4
cr**********@gmail.com wrote:
Hello,
I did what u said and following are the results=>
Please quote what to supply context. The suggested code was:

#include <iostream>
int main()
{
std::cout <<"HI";
return 0;
}

This code is ok. If your compiler has trouble compiling it, the installation
is broken.
g++ ex0.cpp -o ex0
errors=>
In file included from ex0.cpp:1:
/usr/lib/gcc/x86_64-redhat-linux/3.4.4/../../../../include/c++/3.4.4/iostream:44:28:
bits/c++config.h: No such file or directory

[more errors snipped]

The code compiles fine on my machine with g++. I suggest you take this
problem to a gcc or redhat forum where people are more likely to know about
the particulars of your compiler / platform and the possible reasons for
such behavior.
Best

Kai-Uwe Bux
Mar 16 '06 #5
Kai-Uwe Bux wrote:
cr**********@gmail.com wrote:
Hello,
I did what u said and following are the results=>


Please quote what to supply context. The suggested code was:

#include <iostream>
int main()
{
std::cout <<"HI";
return 0;
}

This code is ok. If your compiler has trouble compiling it, the installation
is broken.


I thought that not terminating the final line of output was
implementation-defined (i.e. it was OK for the implementation to not
output anything)?
Mar 16 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: edward hage | last post by:
Hello, I have a Linux machine and I use Netscape 7.1 which I upgraded from Mozilla. I downloaded j2sdj-1.4.2_02 and I have installed the plugins as followes: in .mozilla/plugins- directory a...
2
by: Holger Marzen | last post by:
Hi all, I want to upgrade Postgres 7.1.3 on an old Debian Slink machine (with glibc 2.0.7 and Kernel 2.2.17). That machine runs fine and I can not simply upgrade the OS because it's a busy 24/7...
10
by: Jean-David Beyer | last post by:
I have some programs running on Red Hat Linux 7.3 working with IBM DB2 V6.1 (with all the FixPacks) on my old machine. I have just installed IBM DB2 V8.1 on this (new) machine running Red Hat...
11
by: Vittal | last post by:
Hello All, I have a Linux 64 bit machine and I have installed GCC 3.2.2 on it. Now I want to a compile a small .c file for 32 bit. I tried to use -m32 option for compiling the file as 32 bit....
3
by: David | last post by:
i am trying to compile the following with gcc on a RH 9.0 box: #include <sys/types.h> #include <sys/resource.h> #include <sys/time.h> #include <unistd.h> #include <stdio.h> /* resource.c */
12
by: JS | last post by:
I use winXP and have installed Cygwin. I use Dev-C++ and the Cygwin compiler, but for some reason I can't compile this code: #include <setjmp.h> #include <stdio.h> #include <stdlib.h> ...
4
by: nickpreiser | last post by:
Hi Everyone, I trying to get a build of Python together to run on an Embedded Linux / Mips machine. I run the ./configure --host= XXXmips(my mips proc) --build=XXX x86(my pc). and the...
4
by: mike | last post by:
I need to do a minor update to a 8051 program written in assembler in 1994 and assembled on a machine/language that no longer exists. I wrote the program, so I have some idea how it works. The...
2
by: akhilesh.noida | last post by:
I am trying to compile glibc-2.5 for ARM based board. But I am getting errors while configuring it. Please check and give your inputs for resolving this. configure command : $...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 2 August 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
0
by: Taofi | last post by:
I try to insert a new record but the error message says the number of query names and destination fields are not the same This are my field names ID, Budgeted, Actual, Status and Differences ...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.