Importing Armadillo C++ library into Xcode

拈花ヽ惹草 提交于 2019-12-04 10:26:04

You need to set the following things in your build settings:

  • Header Search Paths: /path/to/armadillo/include (e.g. something like /url/lib/armadillo/include)

This is all you need for your source to compile. However, in order to get your program to link, you will also need the following:

  • Library Search Paths: /path/to/armadillo/libraries (e.g. something like /url/lib/armadillo/lib)
  • Other Linker Flags: -larmadillo (or: add the armadillo library to your Link build phase using the GUI)

If you're not exactly sure how to properly build and install armadillo (e.g. which prefix to use when configuring), I highly recommend using a package manager such as MacPorts to do it for you,

  1. Install port from here
  2. run the following command:

    sudo port install armadillo

  3. Your header path and library path will be: /opt/local/include and /opt/local/lib respectively
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!