質問です。以下のソースをコンパイルすると、A::xが見つからないというリンク時
のエラーになってしまいます。どうしてなのでしょうか。
static intで宣言した変数は、インスタンスを作成しなくても使えると思ったのですが。

gcc.exe (GCC) 3.4.2 (mingw-special)です。

#include <iostream>
class A{
static int x;
public:
static int get_x();
static void set_x(int m_x);
};
int A::get_x(){
return x;
}
void A::set_x(int m_x){
x=m_x;
}
int main(){
A::set_x(5);
std::cout << A::get_x() << std::endl;
}