【问题标题】:How to change the flags of g++ called by libtool during a make如何在 make 期间更改 libtool 调用的 g++ 的标志
【发布时间】: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


    【解决方案1】:

    回答我自己的问题:

    我在“配置”文件中找到了要修改的正确 CXXFLAGS。

    现在调用使用了正确的标志并且安装工作正常!

    【讨论】:

    • 考虑编写一个错误报告,以便作者可以在configure.ac 中进行更改。
    猜你喜欢
    • 2021-12-14
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-12-24
    相关资源
    最近更新 更多