Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想在Xcode IDE(mac os)中设置CPLEX(一个优化库),需要进行一些配置,但是我不知道如何做以下两个安装指示(我想知道如何在Xcode中做) IDE 构建设置,不在命令行终端中)。谁能帮帮我,谢谢:
1.编译器选项:通过选项-D给你的编译器一个预处理指令,像这样:
-DIL_STD
2.链接器选项:指定链接器的库,如下所示:
-lilocplex -lconcert
以下是库构建的正确顺序:
-lilocplex -lconcert -lcplex -lm -lpthread
就像bames53写的那样做。事实上我在上面提到的这两个步骤之后遇到了另一个问题,因为我在库搜索路径中分配了一个32位的库目录。为避免这种情况,应将库路径更改为 64 位。如果要使用 32bit lib,那么在 build settings 中将架构从“64-bit intel”更改为“32-bit intel”。事实上,mac os 通常是 64bit。
选择项目并转到项目编辑器中的构建设置。那里有用于将选项传递给编译器和链接器的设置。