Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to impose D2 on gdc

Tags:

d

gdc

I have installed GDC from the software center of ubuntu.

The problem is that when I tried to compile a source that contain the keyword immutable, it gives me an error. Then I deduced that it compiles only D1.

If i want to compile D2 with GDC, what should I do?

like image 923
Arack Avatar asked May 07 '11 17:05

Arack


3 Answers

You need to pass -v2 to select D2 compiling, e.g.:

gdc -v2 main.d
like image 93
Andrej Mitrović Avatar answered Oct 20 '22 10:10

Andrej Mitrović


The packages in the linux repository are very out of date. To my knowledge, they are not compatible with D2 in any way. I've tried.

The only way that I know how to get D2 working with GDC would be to compile GDC from here: https://bitbucket.org/goshawk/gdc/downloads

If you follow the instruction on the wiki, you can optionally compile it to work with D2.

I have recently switched from dmd to gdc using this method and have had no problems. The code written and tested with dmd compiles cleanly with gdc.

like image 45
1100110 Avatar answered Oct 20 '22 10:10

1100110


Try looking here (warning: it's not yet complete in any shape or form).

like image 5
user541686 Avatar answered Oct 20 '22 09:10

user541686