How to set up Cairo in Xcode for SDK
Hi gang;
I have used Cairo on Windows for SDK development and it works great.
However, I am struggling to get it set up on a Mac in order to compile a Mac version. I am wondering if someone can help getting it to work. These are the steps I've done:
1 - Installed MacPorts
2 - Installed Cairo through MacPorts by going to this website: https://ports.macports.org/port/cairo/ and entering the sudo command in my terminal.
3 - Confirmed Cairo is installed by typing "port contents cairo". It is installed in my /opt/local/lib/ folder.
4 - In the Xcode project navigator, under "Search Paths", I added the Cairo folder entries under "Header Search Paths":
/opt/local/lib/
/opt/local/lib/cairo
/opt/local/include
I also added the path here as well for my cairo.h file and added the include to my .cpp file:
#include <cairo.h>
5 - In the Xcode project navigator, under "Linking", I added "-libcairo.a" entry under "Other Linking Flags"
But when I compile, I get
ld: library not found for -libcairo.a
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Did I miss a step? I find it to be an extremely complicated set up to get this to work. It also doesn't help that I am not good with Macs (nor do I particularly like them). Any help or advice would be highly appreciated.
Thanks,
Richard