`
hqs7636
  • 浏览: 221037 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

利用Poseidon编译新版的DWT(Base on SWT3.3.2)

阅读更多
原文:http://kuan.iteye.com/blog/189115

如不习惯安装及使用DSSS,可以试着用Poseidon编译新的DWT:

1.首先假设您还没下载DMD及Tango,请到http://downloads.dsource.org/projects/tango/snapshots/tango-bin-win32-CURRENT-dmd.1.029.zip下载DMD及Tango的同捆包并安装,假设我安装在D:\DMD1029Tango底下.

2.到http://hg.dsource.org/projects/dwt-win/archive/tip.zip下载dwt-win,然后把zip档中的dwt安装到D:\DMD1029Tango\import底下(变成dwt-win位于D:\DMD1029Tango\import\dwt)

3.下载额外的库到http://downloads.dsource.org/projects/dwt/dwt-win-importlibs.zip并解开到D:\DMD1029Tango\lib底下,并覆盖原有的库.

4.打开poseidon,打开项目,把项目目录设为D:\DMD1029Tango\import\dwt,把项目Type设为Static Library,并按下最右下的Import All自动载入所有新的dwt的文件.

5.编译release版本或除错版本请记得把项目名称重新命名.

6.到Compiler options设定,如要编译release版本,就勾选-O -realease -inline,除错版本就请勾选-debug -g,之后也把-op打勾.

7.到Lib Options,将set page size勾选,并双击设定page size,release版设为128;除错版设为256

8.按下OK储存设定结果,此时parser设定若有选择Use Autocompletion会开始分析,需要一点时间,此时会类似死机,请耐心等一下(我的多线程代码在这里老是导致Poseidon crash(崩溃),我也不知为什么?.......  )

9.文档载入后,打开DWT.d,修改下列源码:
把:
version(build){   
    pragma(link, "advapi32");   
    pragma(link, "comctl32");   
    pragma(link, "comdlg32");   
    pragma(link, "gdi32");   
    pragma(link, "kernel32");   
    pragma(link, "shell32");   
    pragma(link, "ole32");   
    pragma(link, "oleaut32");   
    pragma(link, "olepro32");   
    pragma(link, "oleacc");   
    pragma(link, "user32");   
    pragma(link, "usp10");   
    pragma(link, "msimg32");   
    pragma(link, "opengl32");   
    pragma(link, "shlwapi");   
    //pragma(link, "gdiplus"); // load dynamic   
    //pragma(link, "uxtheme"); // load dynamic   
}  



改成:
version(build){   
    pragma(link, "advapi32");   
    pragma(link, "comctl32");   
    pragma(link, "comdlg32");   
    pragma(link, "gdi32");   
    pragma(link, "kernel32");   
    pragma(link, "shell32");   
    pragma(link, "ole32");   
    pragma(link, "oleaut32");   
    pragma(link, "olepro32");   
    pragma(link, "oleacc");   
    pragma(link, "user32");   
    pragma(link, "usp10");   
    pragma(link, "msimg32");   
    pragma(link, "opengl32");   
    pragma(link, "shlwapi");   
    //pragma(link, "gdiplus"); // load dynamic   
    //pragma(link, "uxtheme"); // load dynamic   
}   
else  
{   
    pragma(lib, "advapi32");   
    pragma(lib, "comctl32");   
    pragma(lib, "comdlg32");   
    pragma(lib, "gdi32");   
    pragma(lib, "kernel32");   
    pragma(lib, "shell32");   
    pragma(lib, "ole32");   
    pragma(lib, "oleaut32");   
    pragma(lib, "olepro32");   
    pragma(lib, "oleacc");   
    pragma(lib, "user32");   
    pragma(lib, "usp10");   
    pragma(lib, "msimg32");   
    pragma(lib, "opengl32");   
    pragma(lib, "shlwapi");   
}  


10.记得把Poseidon内的DMD Path及DMC Path设定到刚安装的DMD目录上,按下ReBuild开始编译!完成后即可得到库.

11.其它不同的库其实也可以应用上述的方法,Enjoy......  
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics