g++ 4.0.2 linking problem
g++ 4.0.2 linking problem
- Subject: g++ 4.0.2 linking problem
- From: "Edward K. Chew" <email@hidden>
- Date: Thu, 21 Dec 2006 20:36:34 -0500
There must be a simple explanation for this, but I am sadly too sleep-
deprived to see it. Here's the code:
struct Foo
{
static const int kMaxBar = 100;
int bar;
int bestBar() const;
};
int Foo::bestBar() const
{
return bar < kMaxBar ? bar : kMaxBar;
}
...and here's the link error:
/usr/bin/ld: Undefined symbols:
Foo::kMaxBar
What am I doing wrong?
-Ted
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden