【发布时间】:2015-02-08 12:46:23
【问题描述】:
我正在尝试安装 vowpal_wabbit (https://github.com/JohnLangford/vowpal_wabbit)。我在 Windows 7 上,所以我使用 cygwin64。
调用“make”时,调用g++:
libtool: compile: g++ -DHAVE_CONFIG_H -I. -I/usr/include -I/include -O3 -fomit-frame-pointer -ffast-math -fno-strict-aliasing -D_FILE_OFFSET_BITS=64 -DNDEBUG -Wall -pedantic -std=c++0x ...
最后我得到了错误:
comp_io.h:28:34: error: 'fileno' was not declared in this scope
fil = gzdopen(fileno(stdin), "rb");
global_data.cc: In constructor 'vw::vw()':
global_data.cc:316:32: error: 'fileno' was not declared in this scope
stdout_fileno = fileno(stdout);
^
Makefile:619: recipe for target 'global_data.lo' failed
make[2]: *** [global_data.lo] Error 1
make[2]: Leaving directory '/home/Sachou/vowpal_wabbit/vowpalwabbit'
Makefile:390: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/home/Sachou/vowpal_wabbit/vowpalwabbit'
Makefile:502: recipe for target 'all-recursive' failed
make: *** [all-recursive] Error 1
根据我的研究,我认为使用 std=gnu++0x 标志而不是 std=c++0x 调用 g++ 可能会解决问题。
我将 makefile 修改为读取 CXXFLAGS = -std=gnu++0x 而不是 c++0x。
但我仍然接到同样的电话,我不知道如何更改标志。
【问题讨论】:
标签: c++ makefile g++ libtool compiler-flags