Questions tagged [gdc]

The D Programming Language front-end for the GCC compiler. Allows the compilation of D source code using GCC. While it isn’t an official part of GCC, it is actively maintained.

59 questions
58
votes
3 answers

DMD vs. GDC vs. LDC

What are the Pros/Cons of the different D Compilers? How is the performance and the standard compliance/D2 support? How well are debuggers supported? How good are the Error messages and is the IDE integration? How good is the 64 bit support? My…
Fritz
  • 750
  • 1
  • 5
  • 8
44
votes
3 answers

What library does ld option -lrt refer to (Bionic libc)?

What does this option to ld mean? -lrt I know to some degree it means that ld is looking for the library with real-time extensions, but after searching extensively, I couldn't find an exact definition (or which library) this is referring to. With…
dwerner
  • 6,462
  • 4
  • 30
  • 44
20
votes
2 answers

Elegant operator overloading in D

For a while I was confused about the direction of D's operator overloading, but now I realize it's a beautiful system... if It would only work with core types (int, float, etc). Consider the follow code: struct Vector { float X, Y; void…
F i L
  • 760
  • 3
  • 12
16
votes
2 answers

Which D Compiler to Use?

I would like to try out D but I'm not quite sure what compiler to use for it. I have found some articles, and also SO questions, on the topic, but I did not find any up-to-date ones. What are the benefits of each compiler, and what are the…
Jeroen
  • 15,257
  • 12
  • 59
  • 102
12
votes
2 answers

Extension Functions in D

I bought "The D Programming Language" a little while ago. Great book, very educational. However I'm having trouble trying to compile a language feature listed in the book: Extension Functions. In the book, Andrei writes any function(a, b) can be…
F i L
  • 760
  • 3
  • 12
11
votes
1 answer

Choosing Between GDC and DMD

I'm new to programming in D. What are the pros and cons of choosing either DMD (2.061) or GDC (4.6, 4.7 or 4.8, snapshot). And what GDC version should I pick? I've successfully built a recent snapshot of GCC-4.8 and GDC-4.8 and it compiles a hello…
Nordlöw
  • 11,838
  • 10
  • 52
  • 99
10
votes
4 answers

ncurses api with the D Programming Language

I am trying to teach myself AI using neural networks. Long story short, I wanted to create a simple graphic that would display what is happening in my program using ncurses. The tutorial that I am using is found here. I was under the impression that…
1100110
  • 503
  • 4
  • 11
10
votes
4 answers

crtbegin_so.o missing for android toolchain (custom build)

I have compiled gdc together with gcc using the android build-gcc.sh script, and have included a new stub in build/core/definitions.mk to deal with D language files as a part of the build process. I know things are compiling OK at this point, but my…
dwerner
  • 6,462
  • 4
  • 30
  • 44
7
votes
1 answer

D performance: union vs @property

I'm in the process of porting, enhancing, and D-atizing our reign SDK from C# to D. Currently working on the Vector2 math module. Will there be any performance difference between the two structs below? My benchmarks show identical performance, but…
F i L
  • 760
  • 3
  • 12
6
votes
1 answer

D2 gdc link error - undefined reference to `_D3std6stdint12__ModuleInfoZ`

I'm using https://bitbucket.org/goshawk/gdc/downloads/gcc-4.5.2-tdm-1-gdc-r575-20110723.zip with TDM GCC 4.5.2 in -v2 mode to build a DLL. In one of the modules I do import std.stdint. So I thought I should link against libgphobos2 to fix this but…
szx
  • 6,433
  • 6
  • 46
  • 67
6
votes
3 answers

How to impose D2 on 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…
Arack
  • 75
  • 4
5
votes
3 answers

Is there a way to create an elegant class-member window-function?

The Window-Procedure in the Win32 API must be static \ global function since it cannot take a class-object (the this) parameter. One can of-course use workarounds like a hWnd->object dictionary and such. I wonder if D has a way to elegantly solve…
Tar
  • 8,529
  • 9
  • 56
  • 127
5
votes
1 answer

How to fix "unrecognized option '-plugin`" when using gdc to compile D program?

I download the GDC for Linux, and try to build a simple D Program. After executing "gdc hello.d -o hello ", it outputs: [root@localhost nan]# gdc hello.d -o hello /usr/bin/ld: unrecognized option '-plugin' /usr/bin/ld: use the --help option for…
Nan Xiao
  • 16,671
  • 18
  • 103
  • 164
5
votes
2 answers

Which D compilers will perform tail-call optimization on this function?

string reverse(string str) pure nothrow { string reverse_impl(string temp, string str) pure nothrow { if (str.length == 0) { return temp; } else { return reverse_impl(str[0] ~…
Meta
  • 1,091
  • 6
  • 14
4
votes
3 answers

D programming on Fedora 16

I've recently installed Fedora 16 (which is great), mostly because I wanted to try LDC2 but also because Gnome Shell runs much smoother on Fedora than Ubuntu 11.10 (at least on my hardware). LDC2 works great, but I'm wondering if, by outputting LLVM…
F i L
  • 760
  • 3
  • 12
1
2 3 4