わかりましたので、C++ に戻ろうとして、基本的なプログラムから始めました。
#include <iostream>
using namespace std;
int main()
{
cout << "So This Is It.";
cout << "\n";
return 0;
}
そして、これは結果です:
-->gcc -g -o HELLO HELLO.cpp
/tmp/ccLZLm5N.o: In function `main':
/root/Programming/Learning/C++/HELLO.cpp:9: undefined reference to `std::cout'
/root/Programming/Learning/C++/HELLO.cpp:9: 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*)'
/root/Programming/Learning/C++/HELLO.cpp:10: undefined reference to `std::cout'
/root/Programming/Learning/C++/HELLO.cpp:10: 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/ccLZLm5N.o: In function `__static_initialization_and_destruction_0':
/usr/include/c++/4.4/iostream:72: undefined reference to `std::ios_base::Init::Init()'
/usr/include/c++/4.4/iostream:72: undefined reference to `std::ios_base::Init::~Init()'
/tmp/ccLZLm5N.o:(.eh_frame+0x12): undefined reference to `__gxx_personality_v0'
collect2: ld returned 1 exit status
私のコンパイラ:
-->gcc --version
gcc (Ubuntu 4.4.3-4ubuntu5.1) 4.4.3
Copyright (C) 2009 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
修正に関する情報を教えてください。また。単純な構文の問題が発生した場合、これに関する正しい情報を見つけるにはどうすればよいですか?