'umfpack.h'找不到,但它在/ opt / local / include /

时间:2013-10-27 03:49:29

标签: macos umfpack

我正在尝试在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"

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

我是否需要添加路径或其他内容?


经过一番搜索后我找到了答案 - 我没有将macports路径添加到我的搜索路径

如何dumb = 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"

0 个答案:

没有答案