Thread: RE: [Dev-C++] Compiling problems with 4.9.7.0 and GCC 3.2
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2003-01-16 13:20:37
|
-------Original Message-------=0D =0D From: Dany P. Wu=0D Date: Thursday, 16 January 2003 9:39:54 AM=0D To: 'Ioannis Vranos'=0D Subject: RE: [Dev-C++] Compiling problems with 4.9.7.0 and GCC 3.2=0D =0D =0D Thank you very much for the above corrections. All of the previous=0D errors are now gone but there's another error now - something to do with=0D the Makefile:=0D =0D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=0D Compiler: Default compiler=0D Building Makefile: "F:\Dev-Cpp\Makefile.win"=0D Finding dependencies for file: F:\Dev-Cpp\D:\Documents and=0D Settings\Dany\My Documents\test.cpp=0D Executing make...=0D make.exe -f "F:\Dev-Cpp\Makefile.win" all=0D F:\Dev-Cpp\Makefile.win:25: *** multiple target patterns. Stop.=0D Execution terminated=0D =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=0D =0D =0D =3D=3D> (I have no idea of makefiles.)=0D =0D =0D =0D This program seems to be quite different than the standard command line=0D compiler I used previously (Borland C++ v5.5). I'm quite new to=0D programming hence easily confused.=0D =0D Can someone please direct me to some tutorial or written material I can=0D use to study? The book I have now is obviously for an older version of=0D C++ or some such.=0D =0D =0D An excellent book for beginners is "Accelerated C++" by Andrew Koenig - Barbara Moo. However if you have finished some introductory book such as=20 Teach Yourself C++ in 21 Days" by Jesse Liberty (even if some outdated version) i suggest you go directly to the Light: "The C++ Programming Language" 3rd Edition or Special Edition by Bjarne Stroustrup (the creato= r of C++). Keep in mind that this book will take years to read it cover to cover thoroughly.=0D =0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |
|
From: <cg...@wo...> - 2003-01-16 18:59:39
|
#include <iostream>
using namespace std;
int main()
{
whatever;
}
In short: the line using namespace std; means that from that line till=20
it gets out of scope, whenever you use a function or a variable, if it=20
exists inside that namespace it is what you are willing to use and not=20
any other function or variable with the same name inside another=20
namespace, and you don't need apend the namespace before each of the=20
functions/variables from it you are using. Of course, if you have a=20
function with the same name in scope and declared outside any=20
namespace, then you will have a conflict between them.
The matter is the namespaces: for avoid problems with the possibility=20
that two different library vendors give the same name to some functions,=20
the declare them inside a namespace so whenever you have to use them you=20
need to declare to which namespace the function or member you're using=20
belongs.
So you have a .h form vendor A and another from vendor B
venA.h
namespace vendorA{
int myfunction();
char *mydata;
}
and venB.h
namespace vendorB{
int myfunction();
char *data;
}
So you can say:
I want the function from A, then I type
vendorA::myfunction();
but if you want the other, then you type
vendor::Bmyfunction();
But if you will use only one of them, or one preferably over the other,=20
you can say
using namespace vendorA;
in a place where it is on scope wherever you'll use its functions, that=20
declares that you want use the functions and members of the namespace=20
vendorA while using namespace vendorA; is in scope.
Then myfunction(); will be a call to vendorA::myfunction.
You can either modify that, which makes available all the functions (and=20
variables) inside the namespace, select only some of them, so in the=20
example, you can say:
#include <venA.h>
using namespace vendorA::myfunction();
int another_function_int_main_calls_from_another_source_file(char firstpa=
r){
myfunction();
vendorA::mydata; <-- Here simply mydata would not work, compiler would=20
report undefined variable.
This is a quick explanation as it comes to my mind right now, I hope you=20
understand it, although I've the feeling that it's not the best=20
explanation I could give you. If you want a clearer explanation, ask me=20
and then I'll answer with clearer explanation, this only intends to be a=20
quick explanation for avoid to forget answer waiting for a moment for=20
say things clearer.
Dany P. Wu wrote:
>>-----Original Message-----
>>From: dev...@li...=20
>>[mailto:dev...@li...] On Behalf=20
>>Of Carlos Garc=EDa del Monte
>>Sent: Thursday, 16 January 2003 11:53 p.m.
>>To: dev-cpp-users-list
>>Subject: Re: [Dev-C++] Compiling problems with 4.9.7.0 and GCC 3.2
>>
>>
>>If you use iostream instead iostream.h you must:
>>1) Add using namespace std; before main or as its first line
>> =20
>>
>
>Can you please explain this one to me? What do I have to do, exactly?
>
> =20
>
>>2) Each time you use a function or name from it you have to=20
>>write std::=20
>>just before it, in your example: std::cout
>>
>>The use of iostream.h is considered deprecated, so if you=20
>>want use it it=20
>>would be more comfortable if you add the compiler option=20
>>-Wno-deprecated, so the compiler won't send you a very long warning=20
>>about it.
>> =20
>>
>
>D.
>
>
> =20
>
|
|
From: Ioannis V. <no...@ho...> - 2003-01-16 19:14:15
|
-------Original Message-------=0D
=0D
From: Carlos Garc=EDa del Monte=0D
Date: Thursday, 16 January 2003 9:01:09 PM=0D
To: Dany P. Wu; dev-cpp-users-list=0D
Subject: Re: [Dev-C++] Compiling problems with 4.9.7.0 and GCC 3.2=0D
=0D
#include <iostream>=0D
=0D
using namespace std;=0D
=0D
int main()=0D
{=0D
whatever;=0D
}=0D
=0D
=0D
=3D=3D> And this is a nice attempt to defeat the namespace system (which =
is bad)
=0D
=0D
=0D
=0D
Ioannis Vranos=0D
=0D
* Programming pages: http://www.noicys.freeurl.com=0D
* Alternative URL: http://run.to/noicys=20
|
|
From: <cg...@wo...> - 2003-01-17 10:51:00
|
Ioannis Vranos wrote:
>-------Original Message-------
>
>=20
>
>From: Carlos Garc=EDa del Monte
>
>Date: Thursday, 16 January 2003 9:01:09 PM
>
>To: Dany P. Wu; dev-cpp-users-list
>
>Subject: Re: [Dev-C++] Compiling problems with 4.9.7.0 and GCC 3.2
>
>=20
>
>#include <iostream>
>
>=20
>
>using namespace std;
>
>=20
>
>int main()
>
>{
>
>whatever;
>
>}
>
>=20
>
>=20
>
>=3D=3D> And this is a nice attempt to defeat the namespace system (which=
is bad)
>
Yeah, namespaces intend, is, as said, have a clear distinction between=20
functions of different vendors, etc which can be named the same way, and=20
your own code can have the same problems, so the recommended (and the=20
best) is avoid this kind of general declaration of a namespace (this=20
phrase is of mine, not from any book) , so the recommended is use=20
namespace_name::variable(orfunction) and simply variable(orfunction) for=20
those you are declaring yourself. Or, if you're lazy, you can use that=20
declaration for individual functions or variables from the namespace you=20
know that there will no other with the same name you want to use, as
using namespace std::cout;
using namespace std::in;
If you don't want use namespaces the rigth way, the best is include the=20
.h versions, which don't declare namespaces, but are considered=20
deprecated and probably (?) they won't be supported in the future, as=20
said in my original answer.
|
|
From: Percival <pma...@nt...> - 2003-01-17 00:49:16
|
It seems that the compiler always mentions this statement:
>> F:/Dev-Cpp/include/c++/iosfwd:44:28: bits/c++config.h: No such file or=
=20
>> directory
Have you tried to include this in your Tools->Compiler Options-=20
>Directories->C++ Includes tab
F: \Dev-Cpp\include\c++\mingw32
..it is where the bits/c++config.h resides :)
Hope this helps
--=20
Percival Rosell Macapal
NEC Telecom Software Philippines, Inc.
Asia Town I.T. Park
Apas, Cebu City, Philippines
Office: +63 (32) 233-9142 local 3121
Mobile: +63 09172586871
Email: pma...@nt...
-------------------------------------------------------------------------=
---=20
------------------------------------
On Thu, 16 Jan 2003 00:40:30 -0800, <dev-cpp-users-=20
re...@li...> wrote:
Message: 4
From: "Dany P. Wu" <da...@qu...>
To: <dev...@li...>
Date: Thu, 16 Jan 2003 18:38:29 +1300
Subject: [Dev-C++] Compiling problems with 4.9.7.0 and GCC 3.2
=A0
Hi everyone,
=A0
This problem has probably come up for discussion numerous times before.
It's certainly puzzled me to no end, being a learner at this whole C++
business.
=A0
I figured, by looking in the include directory, that I should use
iostream instead of iostream.h
=A0
That much seemed obvious but when I typed this typical beginner's code:
=A0
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
#include <iostream>
=A0
main()
{
cout << "Hello world!";
return(0);
}
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D
=A0
I got some humangous amount of errors, 70 I think. I apologise for the
length of this log but I thought I better include it for the sake of
completion. You guys probably know this already.
=A0
The question is, where have I gone wrong? What's happening here? Any
help would be immensely appreciated.
=A0
Cheers,
Dany.
=A0
<quote compile log>
=A0
Compiler: Default compiler
Executing g++.exe...
g++.exe "D:\Documents and Settings\Dany\My Documents\test.cpp" -o
"D:\Documents and Settings\Dany\My Documents\test.exe"
-I"F:\Dev-Cpp\include\c++" -I"F:\Dev-Cpp\include" -L"F:\Dev-Cpp\lib"
In file included from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/iostream:44:28: bits/c++config.h: No such file or
directory
In file included from F:/Dev-Cpp/include/c++/ios:44,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/iosfwd:44:28: bits/c++config.h: No such file or
directory
In file included from F:/Dev-Cpp/include/c++/iosfwd:45,
from F:/Dev-Cpp/include/c++/ios:44,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/stringfwd.h:44:28: bits/c++config.h: No such
file or directory
In file included from F:/Dev-Cpp/include/c++/iosfwd:46,
from F:/Dev-Cpp/include/c++/ios:44,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/fpos.h:44:24: bits/c++io.h: No such file or
directory
In file included from F:/Dev-Cpp/include/c++/bits/fpos.h:45,
from F:/Dev-Cpp/include/c++/iosfwd:46,
from F:/Dev-Cpp/include/c++/ios:44,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/cwchar:49:28: bits/c++config.h: No such file or
directory
In file included from F:/Dev-Cpp/include/c++/iosfwd:46,
from F:/Dev-Cpp/include/c++/ios:44,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/fpos.h:60: 'streamoff' is used as a type,
but is not defined as a type.
F:/Dev-Cpp/include/c++/bits/fpos.h:74: parse error before `__off'
F:/Dev-Cpp/include/c++/bits/fpos.h:75: missing ';' before right brace
F:/Dev-Cpp/include/c++/bits/fpos.h:77: semicolon missing after
declaration of `
std::fpos<_StateT>'
F:/Dev-Cpp/include/c++/bits/fpos.h: In constructor=20
`std::fpos<_StateT>::fpos()':
F:/Dev-Cpp/include/c++/bits/fpos.h:72: class `std::fpos<_StateT>' does
not have any field named `_M_off'
F:/Dev-Cpp/include/c++/bits/fpos.h: At global scope:
F:/Dev-Cpp/include/c++/bits/fpos.h:77: parse error before `(' token
F:/Dev-Cpp/include/c++/bits/fpos.h:77: ISO C++ forbids defining types
within return type
F:/Dev-Cpp/include/c++/bits/fpos.h:77: syntax error before `(' token
F:/Dev-Cpp/include/c++/bits/fpos.h:79: syntax error before `&' token
F:/Dev-Cpp/include/c++/bits/fpos.h:82: syntax error before `&' token
F:/Dev-Cpp/include/c++/bits/fpos.h:86: syntax error before `operator'
F:/Dev-Cpp/include/c++/bits/fpos.h:89: syntax error before `+=3D' token
F:/Dev-Cpp/include/c++/bits/fpos.h:94: syntax error before `operator'
F:/Dev-Cpp/include/c++/bits/fpos.h:97: syntax error before `-=3D' token
F:/Dev-Cpp/include/c++/bits/fpos.h:102: parse error before `&' token
F:/Dev-Cpp/include/c++/bits/fpos.h:103: non-member function `bool=20
operator=3D=3D(...)' cannot have `const' method qualifier
F:/Dev-Cpp/include/c++/bits/fpos.h:103: `bool operator=3D=3D(...)' must h=
ave
an argument of class or enumerated type
F:/Dev-Cpp/include/c++/bits/fpos.h:103: `bool operator=3D=3D(...)' must t=
ake
=A0
exactly two arguments
F:/Dev-Cpp/include/c++/bits/fpos.h: In function `bool operator=3D=3D(...)=
':
F:/Dev-Cpp/include/c++/bits/fpos.h:103: `_M_off' undeclared (first use
this function)
F:/Dev-Cpp/include/c++/bits/fpos.h:103: (Each undeclared identifier is
reported only once for each function it appears in.)
F:/Dev-Cpp/include/c++/bits/fpos.h:103: `__pos' undeclared (first use
this function)
F:/Dev-Cpp/include/c++/bits/fpos.h: At global scope:
F:/Dev-Cpp/include/c++/bits/fpos.h:106: parse error before `&' token
F:/Dev-Cpp/include/c++/bits/fpos.h:107: non-member function `bool=20
operator!=3D(...)' cannot have `const' method qualifier
F:/Dev-Cpp/include/c++/bits/fpos.h:107: `bool operator!=3D(...)' must hav=
e
an argument of class or enumerated type
F:/Dev-Cpp/include/c++/bits/fpos.h:107: `bool operator!=3D(...)' must tak=
e
=A0
exactly two arguments
F:/Dev-Cpp/include/c++/bits/fpos.h:110: parse error before `)' token
F:/Dev-Cpp/include/c++/bits/fpos.h:113: `streamoff' was not declared in
this scope
F:/Dev-Cpp/include/c++/bits/fpos.h:113: parse error before `)' token
F:/Dev-Cpp/include/c++/bits/fpos.h: In function `void _M_position(...)':
F:/Dev-Cpp/include/c++/bits/fpos.h:113: `__off' undeclared (first use
this function)
F:/Dev-Cpp/include/c++/bits/fpos.h: At global scope:
F:/Dev-Cpp/include/c++/bits/fpos.h:114: parse error before `}' token
F:/Dev-Cpp/include/c++/bits/fpos.h:117: syntax error before `;' token In
file included from F:/Dev-Cpp/include/c++/ios:46,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/char_traits.h:59: parse error before `;'
token
F:/Dev-Cpp/include/c++/bits/char_traits.h:60: parse error before `;'
token F:/Dev-Cpp/include/c++/bits/char_traits.h:113: parse error before
`;' token
F:/Dev-Cpp/include/c++/bits/char_traits.h:114: parse error before `;'
token
F:/Dev-Cpp/include/c++/bits/char_traits.h: In static member function
`static int std::char_traits<char>::eof()':
F:/Dev-Cpp/include/c++/bits/char_traits.h:168: `EOF' undeclared (first
use this function) In file included from F:/Dev-Cpp/include/c++/ios:47,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/cstdio:49:28: bits/c++config.h: No such file or
directory
In file included from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/localefwd.h:45:28: bits/c++config.h: No such
file or directory
F:/Dev-Cpp/include/c++/bits/localefwd.h:46:80: bits/c++locale.h: No such
file or directory
In file included from F:/Dev-Cpp/include/c++/bits/localefwd.h:48,
from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/cctype:48:28: bits/c++config.h: No such file or
directory
In file included from F:/Dev-Cpp/include/c++/bits/localefwd.h:49,
from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/string:45:28: bits/c++config.h: No such file or
directory
In file included from F:/Dev-Cpp/include/c++/memory:54,
from F:/Dev-Cpp/include/c++/string:48,
from F:/Dev-Cpp/include/c++/bits/localefwd.h:49,
from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/stl_algobase.h:64:28: bits/c++config.h: No
such file or directory
In file included from F:/Dev-Cpp/include/c++/bits/stl_algobase.h:67,
from F:/Dev-Cpp/include/c++/memory:54,
from F:/Dev-Cpp/include/c++/string:48,
from F:/Dev-Cpp/include/c++/bits/localefwd.h:49,
from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/cstdlib:49:28: bits/c++config.h: No such file or
directory
In file included from F:/Dev-Cpp/include/c++/bits/stl_algobase.h:72,
from F:/Dev-Cpp/include/c++/memory:54,
from F:/Dev-Cpp/include/c++/string:48,
from F:/Dev-Cpp/include/c++/bits/localefwd.h:49,
from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/type_traits.h:54:28: bits/c++config.h: No
such file or directory
In file included from
F:/Dev-Cpp/include/c++/bits/stl_iterator_base_funcs.h:68,
from F:/Dev-Cpp/include/c++/bits/stl_algobase.h:74,
from F:/Dev-Cpp/include/c++/memory:54,
from F:/Dev-Cpp/include/c++/string:48,
from F:/Dev-Cpp/include/c++/bits/localefwd.h:49,
from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/concept_check.h:40:28: bits/c++config.h: No
such file or directory
In file included from F:/Dev-Cpp/include/c++/bits/stl_alloc.h:86,
from F:/Dev-Cpp/include/c++/memory:55,
from F:/Dev-Cpp/include/c++/string:48,
from F:/Dev-Cpp/include/c++/bits/localefwd.h:49,
from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/stl_threads.h:52:23: bits/gthr.h: No such
file or directory
In file included from F:/Dev-Cpp/include/c++/bits/stl_alloc.h:86,
from F:/Dev-Cpp/include/c++/memory:55,
from F:/Dev-Cpp/include/c++/string:48,
from F:/Dev-Cpp/include/c++/bits/localefwd.h:49,
from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/stl_threads.h: At global scope:
F:/Dev-Cpp/include/c++/bits/stl_threads.h:69: '__gthread_mutex_t' is
used as a type, but is not defined as a type.
F:/Dev-Cpp/include/c++/bits/stl_threads.h:79:2: #error
__GTHREAD_MUTEX_INIT or __GTHREAD_MUTEX_INIT_FUNCTION should be defined
by gthr.h abstraction layer, report problem to lib...@gc....
F:/Dev-Cpp/include/c++/bits/stl_threads.h: In member function `void=20
std::_Refcount_Base::_M_incr()':
F:/Dev-Cpp/include/c++/bits/stl_threads.h:86: `_M_ref_count_lock'
undeclared (first use this function)
F:/Dev-Cpp/include/c++/bits/stl_threads.h:86: `__gthread_mutex_lock'
undeclared (first use this function)
F:/Dev-Cpp/include/c++/bits/stl_threads.h:88: `__gthread_mutex_unlock'=20
undeclared (first use this function)
F:/Dev-Cpp/include/c++/bits/stl_threads.h: At global scope:
F:/Dev-Cpp/include/c++/bits/stl_threads.h:158: '__gthread_mutex_t' is
used as a type, but is not defined as a type.
F:/Dev-Cpp/include/c++/bits/stl_threads.h: In member function `void=20
std::_STL_mutex_lock::_M_acquire_lock()':
F:/Dev-Cpp/include/c++/bits/stl_threads.h:192: `_M_lock' undeclared
(first use this function)
In file included from F:/Dev-Cpp/include/c++/memory:55,
from F:/Dev-Cpp/include/c++/string:48,
from F:/Dev-Cpp/include/c++/bits/localefwd.h:49,
from F:/Dev-Cpp/include/c++/ios:48,
from F:/Dev-Cpp/include/c++/ostream:45,
from F:/Dev-Cpp/include/c++/iostream:45,
from D:/Documents and Settings/Dany/My
Documents/test.cpp:1:
F:/Dev-Cpp/include/c++/bits/stl_alloc.h: At global scope:
F:/Dev-Cpp/include/c++/bits/stl_alloc.h:575: syntax error before `;'
token
F:/Dev-Cpp/include/c++/bits/stl_alloc.h:575: confused by earlier errors,
bailing out Execution terminated
=A0
<end quote compile log>
=A0
=A0
--
This mail is a natural product. The slight variations in spelling and=20
grammar enhance its individual character and beauty and in no way are to =
be=20
considered flaws or defects.
=A0
|
|
From: Dany P. W. <da...@qu...> - 2003-01-17 01:31:10
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Percival > Sent: Friday, 17 January 2003 1:51 p.m. > To: dev...@li... > Subject: [Dev-C++] Re: Compiling problems with 4.9.7.0 and GCC 3.2 > > > It seems that the compiler always mentions this statement: > > >> F:/Dev-Cpp/include/c++/iosfwd:44:28: bits/c++config.h: No > such file > >> or > >> directory > > Have you tried to include this in your Tools->Compiler Options- > >Directories->C++ Includes tab > F: \Dev-Cpp\include\c++\mingw32 > > ..it is where the bits/c++config.h resides :) > > Hope this helps HALLELUYAH!!!!! Helps?! It certainly did! :o) Could I be that stupid to miss that? And we now know the answer is YES! Thanks very much for that - it compiled without a single error. Cheers, Dany. -- This mail is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects. |
|
From: Dany P. W. <da...@qu...> - 2003-01-17 01:37:52
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf > Of Percival > Sent: Friday, 17 January 2003 1:51 p.m. > To: dev...@li... > Subject: [Dev-C++] Re: Compiling problems with 4.9.7.0 and GCC 3.2 > > > It seems that the compiler always mentions this statement: > > >> F:/Dev-Cpp/include/c++/iosfwd:44:28: bits/c++config.h: No > such file > >> or > >> directory > > Have you tried to include this in your Tools->Compiler Options- > >Directories->C++ Includes tab > F: \Dev-Cpp\include\c++\mingw32 > > ..it is where the bits/c++config.h resides :) > > Hope this helps Ok, now that it's solved, there's yet another question. I've been using "endl" as in: Std::cout << "Hello world!" << endl; This is supposed to do a carriage return. Unfortunately I get an error which says: ========================================== Compiler: Default compiler Executing g++.exe... g++.exe "F:\Dev-Cpp\Examples\Hello\Hello.cpp" -o "F:\Dev-Cpp\Examples\Hello\Hello.exe" -I"F:\Dev-Cpp\include\c++" -I"F:\Dev-Cpp\include" -I"F:\Dev-Cpp\include\c++\mingw32" -L"F:\Dev-Cpp\lib" F:/Dev-Cpp/Examples/Hello/Hello.cpp: In function `int main(int, char**)': F:/Dev-Cpp/Examples/Hello/Hello.cpp:11: `endl' undeclared (first use this function) F:/Dev-Cpp/Examples/Hello/Hello.cpp:11: (Each undeclared identifier is reported only once for each function it appears in.) Execution terminated ========================================== What do they mean by "undeclared"? I've never had to declare that one before. Cheers, Dany. -- This mail is a natural product. The slight variations in spelling and grammar enhance its individual character and beauty and in no way are to be considered flaws or defects. |
|
From: Ioannis V. <no...@ho...> - 2003-01-17 01:58:23
|
-------Original Message-------=0D =0D From: Dany P. Wu=0D Date: Friday, 17 January 2003 3:38:19 AM=0D To: dev...@li...=0D Subject: RE: [Dev-C++] Re: Compiling problems with 4.9.7.0 and GCC 3.2=0D =0D =0D Ok, now that it's solved, there's yet another question.=0D =0D I've been using "endl" as in:=0D =0D Std::cout << "Hello world!" << endl;=0D =0D This is supposed to do a carriage return. Unfortunately I get an error=0D which says:=0D =0D =0D =3D=3D> C++ makes distinction between uppercase and lowercase. The valid = is std, not Std. Also std is a namespace.=0D =0D So you can do:=0D =0D std::cout<<"Hello new world!"<<std::endl;=0D =0D or=0D =0D using namespace std;=0D =0D cout<<"Hello new world!"<<endl;=0D =0D =0D or=0D =0D using std::cout;=0D using std::endl;=0D =0D cout<<"Hello new world!"<<endl;=0D =0D =0D Try to restrict the using statements in as small scopes as possible.=0D =0D =0D Ioannis Vranos=0D =0D * Programming pages: http://www.noicys.freeurl.com=0D * Alternative URL: http://run.to/noicys=20 |