0

In terminal, this works:

g++ -lgmp main.cpp

while this does not:

g++ main.cpp 

I am using X-code as my IDE and how could I tell X-code to add the statement '-lgmp' when compiling? Thank you:)

Edit: I did according to the article providing the answer: enter image description here

but I still fail:

enter image description here

and this is the error message: enter image description here

More information: I have to use c++98 instead of c++11 because one of my package Gurobi requires that. Do you know any solution? thank you:)

user40780
  • 1,828
  • 7
  • 29
  • 50
  • 2
    Is the `gmp` lib you're using a `dylib` installed on the system, or a static lib? There are several ways to do what you're trying, one of them particularly easy if you're using a dylib. Apart from that, [**see this question**](http://stackoverflow.com/questions/2125079/adding-linker-flags-in-xcode?rq=1), which is nearly identical to yours). – WhozCraig Aug 09 '14 at 21:16
  • Oh... Thank you, actually I am very new in c++ and I am actually not sure what that means.... – user40780 Aug 09 '14 at 21:18
  • That method doesn't work... I edited my post to provide more information:) – user40780 Aug 09 '14 at 21:33

0 Answers0