链接器在D编译器DMD中失败

问题描述

我不知道如何解决此错误,请帮助我解决此问题。

  RDMD   volt
lib/src/volta/parser/base.d(470): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/ir/location.d(130): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/toplevel.d(680): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/templates.d(236): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/templates.d(350): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/expression.d(1048): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/expression.d(1076): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/expression.d(1261): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/expression.d(1404): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/expression.d(1427): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/expression.d(1935): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/declaration.d(421): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/declaration.d(435): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/declaration.d(446): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/declaration.d(871): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/declaration.d(908): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/declaration.d(918): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/declaration.d(940): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/declaration.d(954): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
lib/src/volta/parser/declaration.d(1277): Deprecation: opSub is deprecated.  Use opBinary(string op)(...) if (op == "-") instead.
dsupport/src/watt/text/sink.d(57): Deprecation: returning &this.sink escapes a reference to parameter this,perhaps annotate with return
ld: unknown option: -Wl,-search_paths_first
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: linker exited with status 1
make: *** [GNUmakefile:150: volt] Error 1
  • 操作系统: macOS

  • DMD安装: brew install dmd

  • C字符串:

clang version 10.0.1 
Target: x86_64-apple-darwin17.7.0
Thread model: posix
InstalledDir: /usr/local/opt/llvm/bin
  • 链接器字符串:
@(#)PROGRAM:ld  PROJECT:ld64-253.9
configured to support archs: armv6 armv7 armv7s arm64 i386 x86_64 x86_64h armv6m armv7k armv7m armv7em (tvOS)
LTO support using: Apple LLVM 7.0.2 (clang-700.1.81)

解决方法

为什么要使用LD64?在OSX上仍然存在很多错误,您应该改用系统链接器。

相关问答

错误1:Request method ‘DELETE‘ not supported 错误还原:...
错误1:启动docker镜像时报错:Error response from daemon:...
错误1:private field ‘xxx‘ is never assigned 按Alt...
报错如下,通过源不能下载,最后警告pip需升级版本 Requirem...