Search code examples
c++xcodecore-graphicsquartz-2d

Quartz : Undefined symbols when building for x86_64 architecture


I've create a console project and add Quartz.Framework, QuartzCore.Framework into my app.

But during linking it gives following errors

Undefined symbols for architecture x86_64:
  "_CGColorCreateGenericRGB", referenced from:
      GifFlippingBook::GifFlippingBookCreator::CreateGifFlippingBook(int, int, double, std::string, int, std::string, std::string, int, std::string, std::string, std::string) in main.o
  "_CGDataProviderCreateWithFilename", referenced from:
      GifFlippingBook::GifFlippingBookCreator::CreateGifFlippingBook(int, int, double, std::string, int, std::string, std::string, int, std::string, std::string, std::string) in main.o
  "_CGImageCreateWithPNGDataProvider", referenced from:
      GifFlippingBook::GifFlippingBookCreator::CreateGifFlippingBook(int, int, double, std::string, int, std::string, std::string, int, std::string, std::string, std::string) in main.o

Any ideas why ?


Solution

  • Hah found the answer on my own

    CoreGraphics framework is part of ApplicationServices.Framework so I just need to add it into linking libraries.