How to overlay D2 on gdc

I installed GDC from the ubuntu software center.

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

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

+6
source share
3 answers

Try to find it here (warning: it has not yet been completed in any form or form).

+5
source

You need to pass -v2 to select D2 compilation, for example:

 gdc -v2 main.d 
+10
source

Packages in the linux repository are very outdated. As far as I know, they are not compatible with D2. I tried.

The only way I know how to get D2 to work with GDC is to compile GDC from here: https://bitbucket.org/goshawk/gdc/downloads

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

I recently switched from dmd to gdc using this method and had no problems. Code written and tested with dmd is compiled with gdc.

+6
source

Source: https://habr.com/ru/post/887523/


All Articles