大多数材料都是DMD1和Derelict2.我已经尝试了所有我能想到的东西,而我得到的只是不同种类的垃圾.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"
LINKCMD=%@P%\link.exe
Run Code Online (Sandbox Code Playgroud)
如果没有包含gl3.d的路径(我正在使用Eclipse并且还使用命令shell,Windows XP中的dmd/bud检查)我得到"无法读取gl3.d"错误,这是在路径时修复的被添加到库引用中.
我试图编译的文件是:
import std.stdio;
import derelict.opengl3.gl3;
pragma(lib, "DerelictGL3.lib");
void main(){
DerelictGL3.load();
writeln("Fred");
}
Run Code Online (Sandbox Code Playgroud)
如果我注释掉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
Run Code Online (Sandbox Code Playgroud)
如果我取消注释该编译指示,则错误为:
-------- 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)
Run Code Online (Sandbox Code Playgroud)
并且它一直在以同样的方式进行,直到我认为每个功能都被列出.
请帮忙.