小编use*_*227的帖子

在Windows上使用MinGW构建黄金链接器,FLEX/bison'YYSTYPE'未在此范围内声明

我正在尝试使用mingw构建GNU binutils中包含的黄金链接器.我采取的步骤 -

  1. 使用安装程序安装所有包的mingw.
  2. 使用Windows安装程序将Windows版本的FLEX安装到默认位置.
  3. 从mingw shell中的gold链接器目录中运行./configure,这似乎工作正常
  4. 运行make,这是我遇到一些错误的地方.

我已经将./configure的完整输出包含在了一个pastebin中:http: //pastebin.com/1XLkZVVm

但重要的是这个:

make[2]: Entering directory `c:/binutils-2.23.1/binutils-2.23.1/gold'
g++ -DHAVE_CONFIG_H -I.  -I. -I./../include -I./../elfcpp -DLOCALEDIR="\"/usr/lo
cal/share/locale\"" -DBINDIR="\"/usr/local/bin\"" -DTOOLBINDIR="\"/usr/local//bi
n\"" -DTOOLLIBDIR="\"/usr/local//lib\""   -W -Wall    -Wno-format -Werror -D_LAR
GEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -frandom-seed=expression.o  -MT expression.
o -MD -MP -MF .deps/expression.Tpo -c -o expression.o expression.cc
In file included from expression.cc:33:0:
script-c.h:221:7: ???: 'yylex' initialized and declared 'extern' [-Werror]
script-c.h:221:7: ???: 'YYSTYPE' was not declared in this scope
script-c.h:221:15: ???: expected primary-expression before ',' token
script-c.h:221:17: ???: expected …
Run Code Online (Sandbox Code Playgroud)

c++ mingw binutils gold-linker flex-lexer

5
推荐指数
1
解决办法
1226
查看次数

Binutils ld 链接器如何配置仿真模式(使用 mingw 构建后不支持仿真)

使用 mingw 成功构建 binutils/ld 并尝试运行它后,我收到此消息 -

$ ld-new h:/binutils-2.23.1/ld/.libs/ld-new.exe: 无法识别的模拟模式: 支持的模拟:

我浏览了内部文档,据我了解,您需要设置配置或 makefile,以便在构建过程中安装您想要的模拟模式,但我无法弄清楚您实际上是如何做到这一点的。

如果有人能解释这个过程,我将不胜感激。

非常感谢。

c++ linker mingw ld binutils

5
推荐指数
1
解决办法
1321
查看次数

标签 统计

binutils ×2

c++ ×2

mingw ×2

flex-lexer ×1

gold-linker ×1

ld ×1

linker ×1