2016-04-22 98 views
0

我使用./configure设置了CPPFLAGS和LDFLAGS,但仍未找到标头fst.h。尽管它位于CPPFLAGS目录中的指示位置。CPPFLAGS已设置,但仍未找到标头

./configure CPPFLAGS=-I/Users/username/Downloads/openfst-1.5.1/src/include LDFLAGS=-L/Users/username/Downloads/openfst-1.5.1/src/lib 

...

checking for stdint.h... yes 
checking for unistd.h... yes 
checking fst/fst.h usability... no 
checking fst/fst.h presence... no 
checking for fst/fst.h... no 
configure: error: Required file fst/fst.h not found -- aborting 

我缺少什么?

回答

1

其实你不设置CPPFLAGS环境变量,其中configure脚本检查,但你通过CPPFLAGS=-I/Users/username/Downloads/openfst-1.5.1/src/include作为参数到脚本。与LDFLAGS相同。

你应该将它们设置为脚本之前的环境变量,像

CPPFLAGS=-I/Users/username/Downloads/openfst-1.5.1/src/include LDFLAGS=-L/Users/username/Downloads/openfst-1.5.1/src/lib ./configure 

使用续行,以使其更容易看到所有在一次:

CPPFLAGS=-I/Users/username/Downloads/openfst-1.5.1/src/include \ 
LDFLAGS=-L/Users/username/Downloads/openfst-1.5.1/src/lib \ 
./configure 
+0

谢谢你的提示,但我仍然得到完全相同的错误消息 – user3241376