Undefined symbols for architecture x86_64

I am always getting this error without understand what the hell it mean .
I ve been getting it since i started using c++ object oriented.
can anybody explain it to me?
1
2
3
4
5
6
Undefined symbols for architecture x86_64:
  "ShoppingCart::ShoppingCart()", referenced from:
      Shopper::addItemToCart(Item const&, int) in Shopper-33a57c.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
The linker can't find a definition of ShoppingCart::ShoppingCart(), Have you defined it in your code? Have you defined any other constructor for that class in your code?
all the constructors were defined and classes included. but still same problem.
Check for typographical errors in the definition's signature. Check to make sure that the scope operator is present, and there's no return value.

Make sure that the linker is being passed the translation unit that actually contains the definition.

If you still have trouble, post the definition and the declaration. We might need to see the compiler invocation too.
Topic archived. No new replies allowed.