Код: Выделить всё
#include <iostream>
using namespace std;
int main()
{
cout<<"Hello, World!"<<endl;
return 0;
}А вот ошибки:
Код:
In file included from hello.cpp:1:
In file included from /usr/include/c++/4.1.3/iostream:43:
In file included from /usr/include/c++/4.1.3/ostream:43:
In file included from /usr/include/c++/4.1.3/ios:42:
In file included from /usr/include/c++/4.1.3/iosfwd:45:
In file included from /usr/include/c++/4.1.3/i486-linux-gnu/bits/c++io.h:38:
In file included from /usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr.h:114:
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:92:1: error: weakref declaration of '__gthrw_pthread_once' must be static
__gthrw(pthread_once)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:93:1: error: weakref declaration of '__gthrw_pthread_getspecific' must be static
__gthrw(pthread_getspecific)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:94:1: error: weakref declaration of '__gthrw_pthread_setspecific' must be static
__gthrw(pthread_setspecific)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:95:1: error: weakref declaration of '__gthrw_pthread_create' must be static
__gthrw(pthread_create)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:96:1: error: weakref declaration of '__gthrw_pthread_cancel' must be static
__gthrw(pthread_cancel)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:97:1: error: weakref declaration of '__gthrw_pthread_mutex_lock' must be static
__gthrw(pthread_mutex_lock)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:98:1: error: weakref declaration of '__gthrw_pthread_mutex_trylock' must be static
__gthrw(pthread_mutex_trylock)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:99:1: error: weakref declaration of '__gthrw_pthread_mutex_unlock' must be static
__gthrw(pthread_mutex_unlock)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:100:1: error: weakref declaration of '__gthrw_pthread_mutex_init' must be static
__gthrw(pthread_mutex_init)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:103:1: error: weakref declaration of '__gthrw_pthread_key_create' must be static
__gthrw(pthread_key_create)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:104:1: error: weakref declaration of '__gthrw_pthread_key_delete' must be static
__gthrw(pthread_key_delete)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:105:1: error: weakref declaration of '__gthrw_pthread_mutexattr_init' must be static
__gthrw(pthread_mutexattr_init)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:106:1: error: weakref declaration of '__gthrw_pthread_mutexattr_settype' must be
static
__gthrw(pthread_mutexattr_settype)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:107:1: error: weakref declaration of '__gthrw_pthread_mutexattr_destroy' must be
static
__gthrw(pthread_mutexattr_destroy)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:75:23: note: instantiated from:
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
^
/usr/include/c++/4.1.3/i486-linux-gnu/bits/gthr-default.h:66:46: note: instantiated from:
extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
^
14 diagnostics generated.Что значат эти ошибк? почему они возникают? как с ними бороться?