Newsgroup: it.comp.lang.c++
Titolo: [Dev C++] Aiuto! Affogo! + domanda su <iostream.h> Vs.< iostream>

Ciao a tutti,
Sto cercando di usare l' IDE Dev C++;
Ho un problemino..... non mi funziona il ++, ovvero arrivo a compilare un
codice banalissimo,
---------------------------------------
#include <stdlib.h>
int main(int argc, char *argv[])
{
  system("PAUSE");
  return 0;
}
------------------------------------
e tutto va ok, appena includo iostream
---------------------------------------
#include <iostream>
#include <stdlib.h>
int main(int argc, char *argv[])
{
  system("PAUSE");
  return 0;
}
------------------------------------
e da una marea di errori nelle librerie...
Dai, qualcuno ci è già passato e sa dirmi come fare???
Inoltre... volevo chiedervi una cosa che ancora non ho capito,
ho imparato il C++ su un manuale della Shaum's di qualche anno fa...
adesso ho comprato anche lo Stroustrup 3° edizione ma finora l'ho usato solo
come riferimento:
Io mi ero abituato ad usare gli header con estensione .h (es iostream.h)
adesso invece si scrivono senza...
che fine hanno fatto? come mai non si usano più? e come mai il visual C++
gli accetta ancora? e - di conseguenza - che bisogna fare (indicativamente)
per convertire un programma scritto per <iostream.h> in uno per <iostream>?
Grazie grazie grazie

 La versione che ho io e' la 4.9.6.0
Io ho la Dev-C++ 5.0 beta 7 (4.9.7.0) (10 MB) with Mingw/GCC 3.2
nel compilare parte questa serie di errori,
riesci a capire il problema?
------------------------------------------------------
Compiler: Default compiler
Building Makefile: "C:\Programmi\Microsoft Visual Studio\MyProjects\Prova
DevCpp\Makefile.win"
Executing  make...
make.exe -f "C:\Programmi\Microsoft Visual Studio\MyProjects\Prova
DevCpp\Makefile.win" all
g++.exe -c main.cpp -o
ain.o -I"C:/Dev-Cpp/include"  -I"C:/Dev-Cpp/include/c++"  -I"C:/Dev-Cpp/incl
ude"
In file included from main.cpp:1:
C:/Dev-Cpp/include/c++/iostream:44:28: bits/c++config.h: No such file or
directory
In file included from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/iosfwd:44:28: bits/c++config.h: No such file or
directory
In file included from C:/Dev-Cpp/include/c++/iosfwd:45,
                 from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/stringfwd.h:44:28: bits/c++config.h: No such
file or directory
In file included from C:/Dev-Cpp/include/c++/iosfwd:46,
                 from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/fpos.h:44:24: bits/c++io.h: No such file or
directory
In file included from C:/Dev-Cpp/include/c++/bits/fpos.h:45,
                 from C:/Dev-Cpp/include/c++/iosfwd:46,
                 from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/cwchar:49:28: bits/c++config.h: No such file or
directory
In file included from C:/Dev-Cpp/include/c++/iosfwd:46,
                 from C:/Dev-Cpp/include/c++/ios:44,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/fpos.h:60: 'streamoff' is used as a type, but is
   not defined as a type.
C:/Dev-Cpp/include/c++/bits/fpos.h:74: parse error before `__off'
C:/Dev-Cpp/include/c++/bits/fpos.h:75: missing ';' before right brace
C:/Dev-Cpp/include/c++/bits/fpos.h:77: semicolon missing after declaration
of `
   std::fpos<_StateT>'
C:/Dev-Cpp/include/c++/bits/fpos.h: In constructor
   `std::fpos<_StateT>::fpos()':
C:/Dev-Cpp/include/c++/bits/fpos.h:72: class `std::fpos<_StateT>' does not
have
   any field named `_M_off'
C:/Dev-Cpp/include/c++/bits/fpos.h: At global scope:
C:/Dev-Cpp/include/c++/bits/fpos.h:77: parse error before `(' token
C:/Dev-Cpp/include/c++/bits/fpos.h:77: ISO C++ forbids defining types within
   return type
C:/Dev-Cpp/include/c++/bits/fpos.h:77: syntax error before `(' token
C:/Dev-Cpp/include/c++/bits/fpos.h:79: syntax error before `&' token
C:/Dev-Cpp/include/c++/bits/fpos.h:82: syntax error before `&' token
C:/Dev-Cpp/include/c++/bits/fpos.h:86: syntax error before `operator'
C:/Dev-Cpp/include/c++/bits/fpos.h:89: syntax error before `+=' token
C:/Dev-Cpp/include/c++/bits/fpos.h:94: syntax error before `operator'
C:/Dev-Cpp/include/c++/bits/fpos.h:97: syntax error before `-=' token
C:/Dev-Cpp/include/c++/bits/fpos.h:102: parse error before `&' token
C:/Dev-Cpp/include/c++/bits/fpos.h:103: non-member function `bool
   operator==(...)' cannot have `const' method qualifier
C:/Dev-Cpp/include/c++/bits/fpos.h:103: `bool operator==(...)' must have an
   argument of class or enumerated type
C:/Dev-Cpp/include/c++/bits/fpos.h:103: `bool operator==(...)' must take
   exactly two arguments
C:/Dev-Cpp/include/c++/bits/fpos.h: In function `bool operator==(...)':
C:/Dev-Cpp/include/c++/bits/fpos.h:103: `_M_off' undeclared (first use this
   function)
C:/Dev-Cpp/include/c++/bits/fpos.h:103: (Each undeclared identifier is
reported
   only once for each function it appears in.)
C:/Dev-Cpp/include/c++/bits/fpos.h:103: `__pos' undeclared (first use this
   function)
C:/Dev-Cpp/include/c++/bits/fpos.h: At global scope:
C:/Dev-Cpp/include/c++/bits/fpos.h:106: parse error before `&' token
C:/Dev-Cpp/include/c++/bits/fpos.h:107: non-member function `bool
   operator!=(...)' cannot have `const' method qualifier
C:/Dev-Cpp/include/c++/bits/fpos.h:107: `bool operator!=(...)' must have an
   argument of class or enumerated type
C:/Dev-Cpp/include/c++/bits/fpos.h:107: `bool operator!=(...)' must take
   exactly two arguments
C:/Dev-Cpp/include/c++/bits/fpos.h:110: parse error before `)' token
C:/Dev-Cpp/include/c++/bits/fpos.h:113: `streamoff' was not declared in this
   scope
C:/Dev-Cpp/include/c++/bits/fpos.h:113: parse error before `)' token
C:/Dev-Cpp/include/c++/bits/fpos.h: In function `void _M_position(...)':
C:/Dev-Cpp/include/c++/bits/fpos.h:113: `__off' undeclared (first use this
   function)
C:/Dev-Cpp/include/c++/bits/fpos.h: At global scope:
C:/Dev-Cpp/include/c++/bits/fpos.h:114: parse error before `}' token
C:/Dev-Cpp/include/c++/bits/fpos.h:117: syntax error before `;' token
In file included from C:/Dev-Cpp/include/c++/ios:46,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/char_traits.h:59: parse error before `;' token
C:/Dev-Cpp/include/c++/bits/char_traits.h:60: parse error before `;' token
C:/Dev-Cpp/include/c++/bits/char_traits.h:113: parse error before `;' token
C:/Dev-Cpp/include/c++/bits/char_traits.h:114: parse error before `;' token
C:/Dev-Cpp/include/c++/bits/char_traits.h: In static member function `static
   int std::char_traits<char>::eof()':
C:/Dev-Cpp/include/c++/bits/char_traits.h:168: `EOF' undeclared (first use
this
   function)
In file included from C:/Dev-Cpp/include/c++/ios:47,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/cstdio:49:28: bits/c++config.h: No such file or
directory
In file included from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/localefwd.h:45:28: bits/c++config.h: No such
file or directory
C:/Dev-Cpp/include/c++/bits/localefwd.h:46:80: bits/c++locale.h: No such
file or directory
In file included from C:/Dev-Cpp/include/c++/bits/localefwd.h:48,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/cctype:48:28: bits/c++config.h: No such file or
directory
In file included from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/string:45:28: bits/c++config.h: No such file or
directory
In file included from C:/Dev-Cpp/include/c++/memory:54,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/stl_algobase.h:64:28: bits/c++config.h: No such
file or directory
In file included from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:67,
                 from C:/Dev-Cpp/include/c++/memory:54,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/cstdlib:49:28: bits/c++config.h: No such file or
directory
In file included from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:72,
                 from C:/Dev-Cpp/include/c++/memory:54,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/type_traits.h:54:28: bits/c++config.h: No such
file or directory
In file included from
C:/Dev-Cpp/include/c++/bits/stl_iterator_base_funcs.h:68,
                 from C:/Dev-Cpp/include/c++/bits/stl_algobase.h:74,
                 from C:/Dev-Cpp/include/c++/memory:54,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/concept_check.h:40:28: bits/c++config.h: No such
file or directory
In file included from C:/Dev-Cpp/include/c++/bits/stl_alloc.h:86,
                 from C:/Dev-Cpp/include/c++/memory:55,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/stl_threads.h:52:23: bits/gthr.h: No such file
or directory
In file included from C:/Dev-Cpp/include/c++/bits/stl_alloc.h:86,
                 from C:/Dev-Cpp/include/c++/memory:55,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/stl_threads.h: At global scope:
C:/Dev-Cpp/include/c++/bits/stl_threads.h:69: '__gthread_mutex_t' is used as
a
   type, but is not defined as a type.
C:/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 
libs...@gcc.gnu.org
.
C:/Dev-Cpp/include/c++/bits/stl_threads.h: In member function `void
   std::_Refcount_Base::_M_incr()':
C:/Dev-Cpp/include/c++/bits/stl_threads.h:86: `_M_ref_count_lock' undeclared
   (first use this function)
C:/Dev-Cpp/include/c++/bits/stl_threads.h:86: `__gthread_mutex_lock'
undeclared
   (first use this function)
C:/Dev-Cpp/include/c++/bits/stl_threads.h:88: `__gthread_mutex_unlock'
   undeclared (first use this function)
C:/Dev-Cpp/include/c++/bits/stl_threads.h: At global scope:
C:/Dev-Cpp/include/c++/bits/stl_threads.h:158: '__gthread_mutex_t' is used
as a
   type, but is not defined as a type.
C:/Dev-Cpp/include/c++/bits/stl_threads.h: In member function `void
   std::_STL_mutex_lock::_M_acquire_lock()':
C:/Dev-Cpp/include/c++/bits/stl_threads.h:192: `_M_lock' undeclared (first
use
   this function)
In file included from C:/Dev-Cpp/include/c++/memory:55,
                 from C:/Dev-Cpp/include/c++/string:48,
                 from C:/Dev-Cpp/include/c++/bits/localefwd.h:49,
                 from C:/Dev-Cpp/include/c++/ios:48,
                 from C:/Dev-Cpp/include/c++/ostream:45,
                 from C:/Dev-Cpp/include/c++/iostream:45,
                 from main.cpp:1:
C:/Dev-Cpp/include/c++/bits/stl_alloc.h: At global scope:
C:/Dev-Cpp/include/c++/bits/stl_alloc.h:575: syntax error before `;' token
C:/Dev-Cpp/include/c++/bits/stl_alloc.h:575: confused by earlier errors,
bailing out
make.exe: *** [main.o] Error 1
Execution terminated
----------------------------------------------------------------------------
----


 * Cut "DO NOT DISTURB" to reply */

 ------------------------------------------------------
Supercut!
Per ora mi pare di capire che la versione che avete voi e cioe' la beta 7
(4.9.7.0),
ha seri problemi in quanto non trova degli header files:
bits/c++config.h
bits/c++io.h
bits/c++locale.h
bits/gthr.h
A parte il fatto che nella versione precedente che ho io non esiste una
sottodirectory che si chiama bits
Ma la cosa strana di questi messaggi, e' che hanno in comune il fatto che
dopo la stringa c++ o il carattere g dovrebbe esserci il carattere / perche'
secondo me si tratta di directory sia c++ che g.
Controlla sotto l'include del tuo DevC++ se hai delle directory C++ e g,
perche' io non le ho.
Comunque si tratta di un errore che si trova in uno o piu' dei files header
che hai scaricato col DevC++ e che ...
potresti correggere a mano!
Altrimenti se la trovi scaricati la versione beta 6 che per me non da
problemi.
Maurus

Ho risolto il problema,
ho trovato un post sul forum del Dev-C++,
c'è una directory "bits" sotto
C:\Dev-Cpp\include\c++\mingw32\bits
dove si trovano i file che il compilatore cerca in
C:\Dev-Cpp\include\c++\bits
li ho copiati dalla prima alla seconda ed adesso sembra funzionare!
Grazie a tutti!




 grazie
Il DevC++ ha di particolare che e' un buon ambiente di sviluppo C++ sotto
Windows che usa un buon compilatore che e' stato portato dal linux ed e'
gratuito.
Per l'altra cosa penso che dovresti procurarti qualche software che gestisca
l'UML.
Ci sono anche gratuiti ma non so fino a che punto facciano quello che
chiedi.
Sicuramente il Rational Rose lo fa ed anche altri a pagamento.
Comunque ho anche visto applicazioni particolari non UML che fanno dei
diagrammi ma non trovo i links.
Maurus
Maurus

 ha scritto nel messaggio
news:aLpS9.88864$Ou4.2...@twister2.libero.it...
