makefile 问题,尝试编译 libdai

makefile 问题,尝试编译 libdai

我想编译 libDAI。它附带了一个 Makefile.conf,其中包含以下行

MEXFLAGS:=CXX\#g++ CXXFLAGS\#'$(CCFLAGS)'

当我尝试使用“make”时,这似乎会引起麻烦

jeremy@jrr:~/[email protected]/techdev/Research/clothes_specific

/fashionista/fashionista_v0.2/lib/libdai$ make 

/usr/local/MATLAB/R2015a/bin/mex -Iinclude CXX#g++
CXXFLAGS#'-Wno-deprecated -Wall -W -Wextra -fpic'  -DDAI_WITH_BP
-DDAI_WITH_FBP -DDAI_WITH_TRWBP -DDAI_WITH_MF -DDAI_WITH_HAK -DDAI_WITH_LC -DDAI_WITH_TREEEP -DDAI_WITH_JTREE -DDAI_WITH_MR -DDAI_WITH_GIBBS -DDAI_WITH_CBP -DDAI_WITH_DECMAP -Llib -ldai -lgmpxx -lgmp -output +libdai/dai.mexa64 src/matlab/dai.cpp src/matlab/matlab.cpp lib/libdai.a
/home/jeremy/[email protected]/techdev/Research/clothes_specific/fashionista/fashionista_v0.2/lib/libdai/CXX#g++
not found; check that you are in the correct current folder, and check
the spelling of
'/home/jeremy/[email protected]/TrendiGuru/techdev/Research/clothes_specific/fashionista/fashionista_v0.2/lib/libdai/CXX#g++'.
make: *** [+libdai/dai.mexa64] Error 255

看起来 CXX 是一些没有设置的变量。我尝试将其取出并留下 MEXFLAGS:=g++ 但或多或少会发生同样的事情。

答案1

将其更改为以下行

MEXFLAGS:=CXX=#$(CC) CXXFLAGS\#'$(CCFLAGS)'

确保 CC 之前已定义:

CC=g++

相关内容