Linking GMP to Xcode 4.5

后端 未结 1 569
花落未央
花落未央 2020-12-22 09:41

I\'ve downloaded the GMP multiprecision library and I compiled without errors the following code through the terminal with the gcc main.c -lgmp command but I c

相关标签:
1条回答
  • 2020-12-22 09:46

    (Answered in a question edit. Converted to a community wiki answer. See What is the appropriate action when the answer to a question is added to the question itself? )

    The OP wrote:

    SOLVED

    1) Open the left panel, goto "ProjectName", Targets, Build phases, Link binary with libraries and select your library.

    2) Open the left panel, goto "ProjectName", Project, Header Search Paths, write the path where the headers of your library are (the .h files, usually in /usr/local/include).

    3) Open the left panel, goto "ProjectName", Project, Library Search Paths, write the path where your libraries are (the .a or .dylib files, usually in /usr/local/lib)

    0 讨论(0)
提交回复
热议问题