Ciao a tutti
Ho provato a fare un semplicissimo programma in C++
Ecco il codice:
Ho provato a compilarlo facendo gcc prova.cppcodice:#include <iostream.h> int main(void) { int num = 0; cout << "PROVA"; cin >> num; }
Ecco il risultato:
Manca qualcosa da installare????codice:damiano@damiano:~$ gcc prova.cpp In file included from /usr/include/c++/3.3/backward/iostream.h:31, from prova.cpp:1: /usr/include/c++/3.3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider usingone of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated. prova.cpp:6:2: warning: no newline at end of file /tmp/ccDr5qn9.o(.text+0x22): In function `main': : undefined reference to `std::cout' /tmp/ccDr5qn9.o(.text+0x27): In function `main': : undefined reference to `std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)' /tmp/ccDr5qn9.o(.text+0x35): In function `main': : undefined reference to `std::cin' /tmp/ccDr5qn9.o(.text+0x3a): In function `main': : undefined reference to `std::basic_istream<char, std::char_traits<char> >::operator>>(int&)' /tmp/ccDr5qn9.o(.text+0x63): In function `__static_initialization_and_destruction_0(int, int)': : undefined reference to `std::ios_base::Init::Init[in-charge]()' /tmp/ccDr5qn9.o(.text+0x94): In function `__tcf_0': : undefined reference to `std::ios_base::Init::~Init [in-charge]()' /tmp/ccDr5qn9.o(.eh_frame+0x11): undefined reference to `__gxx_personality_v0' collect2: ld returned 1 exit status damiano@damiano:~$
Ho Debian Sarge
Grazie![]()

Rispondi quotando