0

This is the lines used to compile a c++ programme.

  g++ xp_example2.cpp api/gdxco.cpp ../C/api/gdxcc.c api/optco.cpp ../C/api/optcc.c api/gamsxco.cpp ../C/api/gamsxcc.c -Iapi -I../C/api

However, when I use IDE Xcode, I don't know what to change so that I arrive at the exact same thing. For example, How shall I edit my Xcode to incorporated the things like "-I" ? Thank you.

Edited by mike_2000_17: moved to C++ forum

3
Contributors
2
Replies
21
Views
2 Years
Discussion Span
Last Post by iamthwee
0

The -I options are for "include directories". There should be a setting in Xcode to allow you to specify a list of include directories, in which you would enter api and ../C/api (or as absolute paths). For the cpp files, you just add them to your project.

N.B.: I don't use Xcode or Mac, so I'm just giving general advice here, as most IDEs have the same kinds of menus and configuration options, so, it should be valid for Xcode too.

Otherwise, you can also use command line tools in Xcode, you just have to install them.

1

I use a mac sometimes but I just use g++ for macs. Stay away from xcode it is unecessary unless you're building apps.

Why? Xcode is a huge download and involves registering a mac account blah blah.

https://github.com/kennethreitz/osx-gcc-installer

That is only 4.7mb I think and works very much the same way you would use c++ in a linux environment. Well that's what I use if I need to break out c++ on my mac which is rare nowadays given the work I do.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.