• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
g++ 4.0.2 linking problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: g++ 4.0.2 linking problem
      • From: "B.J. Buchalter" <email@hidden>
  • Prev by Date: Setting a watchpoint in Xcode for a Java program
  • Next by Date: Re: g++ 4.0.2 linking problem
  • Previous by thread: Re: Setting a watchpoint in Xcode for a Java program
  • Next by thread: Re: g++ 4.0.2 linking problem
  • Index(es):
    • Date
    • Thread