在Ubuntu 10.04上设置可用的D2.x工具链(使用gtkd) [英] Setting up a working D2.x toolchain (with gtkd) on Ubuntu 10.04

查看:108
本文介绍了在Ubuntu 10.04上设置可用的D2.x工具链(使用gtkd)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经和D玩了几天,对此感到非常兴奋,直到我试图让gtkd正常工作为止.我现在已经浪费了三天的大部分时间来尝试进行有效的设置,并且开始变得(很早以前就读过)有些士气低落.我想知道在我放弃之前是否有人可以提供帮助.我在网上可以找到很多信息,这些信息已经过时了,所以我不确定我是否认为这是可能的.

I've been playing around with D for a few days and was getting quite excited about it until, that is, I tried to get gtkd working. I've now wasted the best part of 3 days trying to get a working setup and am beginning to get (read; long ago got) a bit demoralised. I was wondering if anyone can help before I give up. A lot of the information I can find online is outdated so I'm not sure if I'm even right in thinking this is even possible.

其余内容与我到目前为止已经尝试过的一样,如果您有快速的解决方案,则可能不需要阅读,请随时跳转至... [跳到此处]

因此,首先,我需要知道,探戈实际上可与D2.0一起使用,我相信它并不是最初可用的,但现在D2.x使得您可以将探戈和phobos一起使用.如果这不是真的,那么我想我已经陷入了第一个障碍,这是一个不起眼的人.

So, firstly I need to know, is tango actually available for use with D2.0, I believe that it wasn't originally but now D2.x is such that you can use tango and phobos alongside each other. If this isn't true, then I guess I've fallen at the first hurdle and this is a non-starter.

到目前为止我已经采取的步骤.

The steps I've taken so far.

  1. 我从ubuntu存储库安装了gdc
  2. 我从存储库中安装了libtango-header(请注意,仅标头,没有可用的lib,所以帮助不大)
  3. 我手动安装了dsss

此设置将编译D,但是当我开始安装gtkd(与dsss一起使用)时,它已编译,但是在尝试使用它编译任何东西时遇到了各种各样的错误(与探戈有关).好吧,正如我提到的,我没有库,所以这应该不是意外的.我尝试手动安装探戈库,但仍然出现很多错误,最后还是诉诸dsss net install tango,该警告我说我将无法回到phobos(就像我提到的那样,这让我感到困惑.认为两者可以同时使用),我继续进行,这完全搞砸了我的设置.我现在无法编译任何D.

This setup would compile D but when I came to installing gtkd (with dsss), it compiled but I got all sorts of errors (relating to tango) when trying to compile anything using it. Well, as I've mention I didn't have the libs so this shouldn't have been unexpected. I tried to install the tango libs manually but still got loads of errors and in the end resorted to a dsss net install tango which warned me that I wouldn't be able to go back to phobos (something which confused me as as I have mentioned I thought the two could be used alongside each other) anyway, I proceeded and it completely screwed my setup. I couldn't compile any D now.

对不起,我无法确切地说明我在上一节中遇到的错误,

无论如何,我删除了已安装的所有内容.并重新开始.

Anyway, I removed everything I had installed. And started afresh.

  1. 我从存储库中安装了gdc
  2. 我手动安装了dsss

我现在读到最新的探戈不适用于gdc(不确定这是不是真的),所以我

I now read that the latest tango doesn't work with gdc (not sure if this is true) so I

  1. 为dmd准备好deb并安装它.
  2. 手动安装了最新的探戈(库和标头).
  3. 使用dsss安装gtkd

现在我无法让dsss识别dmd,因此只能将gdc与它一起使用.然而,那没有找到探戈.如果我直接使用dmd,它会找到探戈和gtkd,但是会出现关于volatile语句被弃用的错误.在D2.x中显然是正确的,这使我回到甚至支持探戈".

Now I can't get dsss to recognize dmd, so can only use gdc with it. That however doesn't find tango. If I use dmd directly it finds tango and gtkd but I get errors about volatile statements being deprecated. Something which is apparently true in D2.x, which brings me back to "is tango even supported".

天哪,我很困惑!

[跳到此处]

如果任何人都可以逐步指导我如何进行有效的设置,我将永远感激不已!

If anyone can give me step by step instructions on how to get a working setup set up, I'd be forever grateful!

谢谢,T.

更新:我们在那里!"

所以我从 http://www.digitalmars.com/d下载了dmd.2.049.zip/download.html 并解压缩到我的主目录,然后执行export PATH = $PATH:~/dmd2/linux/bin(感谢dsimcha).

So I downloaded dmd.2.049.zip from http://www.digitalmars.com/d/download.html and extracted to my home directory and did a export PATH = $PATH:~/dmd2/linux/bin (thanks to dsimcha).

忘记了dsss.按照 http://www.dsource.org/上的说明获取gtkd的svn版本projects/gtkd/wiki/UsingSubversion .编辑GNUmakefile以将前缀更改为/home/me/dmd2/linux并执行make install.

Forgot about dsss. Got the svn version of gtkd as per the instructions at http://www.dsource.org/projects/gtkd/wiki/UsingSubversion. Edited GNUmakefile to change the prefix to /home/me/dmd2/linux and did a make install.

编辑了~/dmd2/linux/bin/dmd.conf,所以包含路径包括了../include(gtkD库放在了../lib中,因此我不需要编辑库路径).

Edited ~/dmd2/linux/bin/dmd.conf so the include paths included ../include (the gtkD libs are put in ../lib so I didn't need to edited the library paths).

现在终于可以使用gtkD进行编译了,我需要链接到libgtkd和libdl,这是由dmd mydprog.d -L-lgtkd -L-ldl(感谢jpf)完成的.

Now finally to compile with gtkD I needed to link against libgtkd and libdl, this was done by, dmd mydprog.d -L-lgtkd -L-ldl(thanks to jpf).

推荐答案

  1. Tango不适用于D2.很久以前,就已经进行了一些移植工作,但是这种方法碰壁了,目前尚不清楚它是否真的会完成. D2的OTOH Phobos比D1的Phobos好很多,因此缺少探戈并没有听起来那么糟糕.

  1. Tango does not work with D2. There was some effort a long time ago towards porting it, but this kind of hit a wall and it's unclear whether this is ever actually going to be finished. OTOH Phobos for D2 is much better than Phobos for D1, so lack of Tango is not as bad as it sounds.

GDC支持D2的较旧版本. gtkD绝对不可能用它进行编译.您应该使用参考DMD编译器.

GDC supports an ancient version of D2. There's absolutely no chance of gtkD compiling with it. You should use the reference DMD compiler.

通常,在Linux上设置DMD的正确方法是简单地将dmd.2.0xx.zip解压缩到您的主目录中,并执行export PATH = $PATH:~/dmd2/linux/bin以确保DMD可执行文件在您的路径中.然后一切都应该正常工作(使用DMD2和Phobos).

Generally the proper way to set up DMD on Linux is to simply unzip dmd.2.0xx.zip into your home directory and do an export PATH = $PATH:~/dmd2/linux/bin to make sure the DMD executable is in your path. Then everything should work (with DMD2 and Phobos).

这篇关于在Ubuntu 10.04上设置可用的D2.x工具链(使用gtkd)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆