1

I am adding a library #include <igraph.h> that I can access via

INCLUDES=-I/usr/local/include/igraph
LFLAGS=-L/usr/local/lib
LIBS=-ligraph

How do I create project on Mac's Xcode and setup the equivalent to INCLUDES, LFLAGS, and LIBS on Xcode 6.3.#? I found a related SO SO Question, but it doesn't have all the info I need/look for.

The steps I took on Xcode:

  1. New Project > OS X > Application > Command Line Tube
  2. Entered a Product & Organization Name; Organizational identifier, Language=C
  3. I picked a folder
  4. On top left the project is selected, to the right I have Build Settings, Build Phases, Rules

But if I set the under the Build Settings > Compiled Sources :: Compiler Flags to -I/usr/local/include/igraph -L/usr/local/lib -ligraph I get the following warnings:

clang: warning: -ligraph: 'linker' input unused
clang: warning: argument unused during compilation: '-L/usr/local/lib'

along with many errors that start with

Undefined symbols for architecture x86_64:
"_igraph_community_infomap", referenced from:
_infomap_weighted_test in ig_read_edgelist.o

I suspect igraph is a 64bit library, but will have to double check that.

But, again, what I am looking for is a way to generate a Makefile from the Xcode project that will allow me to compile the project on either system.

Community
  • 1
  • 1
sAguinaga
  • 638
  • 13
  • 31

0 Answers0