如何在 makefile 中指定和使用本地安装的包?

问题描述

我正在尝试制作一个需要犰狳作为依赖项的程序。我已经在本地目录中安装了犰狳(我正在一个没有 root 权限的集群上工作),但我无法安装该程序,因为它找不到犰狳。我将如何指定?在此先感谢您的帮助!

我在做什么和看到了什么:

$ make
g++     -O3 -o ancestry_hmm ancestry_hmm.cpp -larmadillo
ancestry_hmm.cpp:22:21: fatal error: armadillo: No such file or directory
 #include <armadillo>
                     ^
compilation terminated.
make: *** [all] Error 1

当前 Make 文件:

TCFLAGS = -ltcmalloc
ARMAFLAGS = -larmadillo

all:
        $(LINK.cc) -O3 -o ancestry_hmm ancestry_hmm.cpp $(ARMAFLAGS)

犰狳之路: /{user}/Programs/Anaconda/*.so /{user}/Programs/Anaconda/

解决方法

答案由 Claes Rolen 在评论中提供。我还必须添加 -lgfortran,但它有效,谢谢!

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...