4

我正在尝试在 OSX 10.8 上编译一个名为 hiQlab 的程序

g++ -g -O2 -I`echo /Users/.../Documents/hiQlab/hiqlab-2006-07-20/tools/`/lua/include -I`echo /Users/.../Documents/hiQlab/hiqlab-2006-07-20/tools/`/tolua++/include -c cscmatrix.cc
cscmatrix.cc:13:12: fatal error: 'umfpack.h' file not found

#include "umfpack.h"

但我刚刚通过包含 umfpack 的 macports 安装了 SuiteSparse umfpack.h,实际上它存在于默认目录中/opt/local/include/

我需要添加路径还是什么?


好的,经过更多搜索后,我找到了答案——我没有将 macports 路径添加到我的搜索路径中

多么愚蠢 =p,因为我 8 小时都无法回答我自己的问题,所以我将在这里进行编辑

vi ~/.profile

export PATH=/opt/local/bin:/opt/local/sbin:$PATH
export MANPATH=/opt/local/share/man:$MANPATH
export C_INCLUDE_PATH=/opt/local/include
export CPLUS_INCLUDE_PATH=/opt/local/include
export LIBRARY_PATH=/opt/local/lib
alias gcc="gcc -I/opt/local/include -L/opt/local/lib"
alias g++="g++ -I/opt/local/include -L/opt/local/lib"
4

0 回答 0