1

我正在尝试按照随附的安装说明在 Lion上构建Derelict2。当我运行命令时,以下库构建良好:make -fmac.mak DC=dmd

  • 遗弃快板
  • 遗弃FMOD
  • 被遗弃的FT
  • 遗弃GL
  • 遗弃IL
  • 遗弃ODE
  • 遗弃的Ogg
  • 遗弃PA

不幸的是,一旦脚本升级到 DerelictSDL,它就会吐出以下内容:

make -C DerelictSDL all PLATFORM=mac
dmd -release -O -inline -I../DerelictUtil -c derelict/sdl/sdl.d derelict/sdl/sdlfuncs.d derelict/sdl/sdltypes.d -Hd../import/derelict/sdl
dmd -release -O -inline -I../DerelictUtil -c derelict/sdl/macinit/CoreFoundation.d derelict/sdl/macinit/DerelictSDLMacLoader.d derelict/sdl/macinit/ID.d derelict/sdl/macinit/MacTypes.d derelict/sdl/macinit/NSApplication.d derelict/sdl/macinit/NSArray.d derelict/sdl/macinit/NSAutoreleasePool.d derelict/sdl/macinit/NSDictionary.d derelict/sdl/macinit/NSEnumerator.d derelict/sdl/macinit/NSEvent.d derelict/sdl/macinit/NSGeometry.d derelict/sdl/macinit/NSMenu.d derelict/sdl/macinit/NSMenuItem.d derelict/sdl/macinit/NSNotification.d derelict/sdl/macinit/NSObject.d derelict/sdl/macinit/NSProcessInfo.d derelict/sdl/macinit/NSString.d derelict/sdl/macinit/NSZone.d derelict/sdl/macinit/runtime.d derelict/sdl/macinit/SDLMain.d derelict/sdl/macinit/selectors.d derelict/sdl/macinit/string.d     -Hd../import/derelict/sdl/macinit
derelict/sdl/macinit/NSString.d(134): Error: cannot implicitly convert expression (this.length()) of type ulong to uint
derelict/sdl/macinit/NSString.d(135): Error: cannot implicitly convert expression (str.length()) of type ulong to uint
derelict/sdl/macinit/NSString.d(140): Error: cannot implicitly convert expression (cast(ulong)(selfLen + aStringLen) - aRange.length) of type ulong to uint
make[1]: *** [dmd_mac_build_sdl] Error 1
make: *** [DerelictSDL_ALL] Error 2
4

2 回答 2

1

Derelict 的最新版本是Derelict3,它位于 GitHub 上

至于您的错误,您似乎正在为 64 位进行编译,而 Derelict2 中显然没有考虑到这一点。

您只需要修复源代码。这样做的正确方法是将这些实例更改为使用size_t而不是uint,但cast(size_t)在错误消失之前,这些表达式可能更容易:-) 长度不太可能超过 40 亿,所以你应该很好,直到你切换到 Derelict3。

于 2012-05-15T09:33:43.830 回答
0

尝试在 32 位模式下编译。我相信这是 dmd 和 gdc/gdmd 的 -m32 选项

于 2012-05-18T21:22:40.013 回答