如何在DMD2上设置Derelict 3?
大部分材料都是DMD1和废弃的2。我已经尝试了我能想到的一切,我得到的只是各种各样的垃圾。DMD2安装正常,因为我可以编译hello worlds。我的sc.ini如下:如何在DMD2上设置Derelict 3?,d,D,大部分材料都是DMD1和废弃的2。我已经尝试了我能想到的一切,我得到的只是各种各样的垃圾。DMD2安装正常,因为我可以编译hello worlds。我的sc.ini如下: [Version] version=7.51 Build 020 [Environment] LIB="%@P%\..\lib";\dm\lib DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import" "-I%@P%\..\..\src\etc"
[Version]
version=7.51 Build 020
[Environment]
LIB="%@P%\..\lib";\dm\lib
DFLAGS="-I%@P%\..\..\src\phobos" "-I%@P%\..\..\src\druntime\import" "-I%@P%\..\..\src\etc"
LINKCMD=%@P%\link.exe
如果没有包含gl3.d的路径(我正在使用Eclipse,还使用命令shell中的dmd/bud检查内容,Windows XP),则会出现“无法读取gl3.d”错误,该错误在将路径添加到库引用时得到修复
我试图编译的文件是:
import std.stdio;
import derelict.opengl3.gl3;
pragma(lib, "DerelictGL3.lib");
void main(){
DerelictGL3.load();
writeln("Fred");
}
如果注释掉pragma,则错误为:
OPTLINK (R) for Win32 Release 8.00.12
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
bin\Main.obj(Main)
Error 42: Symbol Undefined _D8derelict7opengl33gl312__ModuleInfoZ
bin\Main.obj(Main)
Error 42: Symbol Undefined _D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader
--- errorlevel 2
-------- Build Commands: --------
-od"bin"
-of"bin\Main.exe"
-I"src"
"src\Main.d"
OPTLINK (R) for Win32 Release 8.00.12
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
D:\Programming\DMD\dmd2\windows\bin\..\lib\DerelictGL3.lib(gl3)
Error 42: Symbol Undefined _D8derelict4util6loader15SharedLibLoader19isAutoUnloadEnabledOFNdZb
D:\Programming\DMD\dmd2\windows\bin\..\lib\DerelictGL3.lib(gl3)
Error 42: Symbol Undefined _D8derelict4util9exception17DerelictException7__ClassZ
D:\Programming\DMD\dmd2\windows\bin\..\lib\DerelictGL3.lib(gl3)
如果取消对pragma的注释,则错误为:
OPTLINK (R) for Win32 Release 8.00.12
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
bin\Main.obj(Main)
Error 42: Symbol Undefined _D8derelict7opengl33gl312__ModuleInfoZ
bin\Main.obj(Main)
Error 42: Symbol Undefined _D8derelict7opengl33gl311DerelictGL3C8derelict7opengl33gl317DerelictGL3Loader
--- errorlevel 2
-------- Build Commands: --------
-od"bin"
-of"bin\Main.exe"
-I"src"
"src\Main.d"
OPTLINK (R) for Win32 Release 8.00.12
Copyright (C) Digital Mars 1989-2010 All rights reserved.
http://www.digitalmars.com/ctg/optlink.html
D:\Programming\DMD\dmd2\windows\bin\..\lib\DerelictGL3.lib(gl3)
Error 42: Symbol Undefined _D8derelict4util6loader15SharedLibLoader19isAutoUnloadEnabledOFNdZb
D:\Programming\DMD\dmd2\windows\bin\..\lib\DerelictGL3.lib(gl3)
Error 42: Symbol Undefined _D8derelict4util9exception17DerelictException7__ClassZ
D:\Programming\DMD\dmd2\windows\bin\..\lib\DerelictGL3.lib(gl3)
它一直以同样的方式运行,直到我假设每个函数都被列出
请提供帮助。您必须添加一个
pragma(lib,“DerelictUtil.lib”)
,或针对它的链接。(这与Derelict2相同)您必须添加一个pragma(lib,“DerelictUtil.lib”)
,或针对它的链接。(被遗弃者也是如此2)