gdc

DMD vs. GDC vs. LDC

纵饮孤独 提交于 2019-12-31 08:33:09
问题 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 thought so far: DMD Mature and well maintained Only one platform, 64 bit support is not good Not FOSS GDC Supports various platforms Has very mature optimizations, so it's fast? Out of date runtime? GCC so a good debugger support? LDC Supports various

ncurses api with the D Programming Language

≯℡__Kan透↙ 提交于 2019-12-22 03:55:46
问题 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 D was compatible with C and I could theoretically call C functions relatively easily. I find that not to be the case. I am a relatively novice programmer, so even the simplistic explanations are a little above my head. I found this here. D is

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

家住魔仙堡 提交于 2019-12-06 05:02:53
问题 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 usage information collect2: error: ld returned 1 exit status Then I use " gdc -v hello.d -o hello " command, and try to find the root cause. It displays: ...... COLLECT_GCC_OPTIONS='-v' '-o' 'hello' '-shared-libgcc' '-mtune=generic' '-march=x86-64'

ncurses api with the D Programming Language

旧时模样 提交于 2019-12-05 02:18:42
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 D was compatible with C and I could theoretically call C functions relatively easily. I find that not to be the case. I am a relatively novice programmer, so even the simplistic explanations are a little above my head. I found this here . D is designed to fit comfortably with a C compiler for the target system. D makes up for not having its own VM

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

前提是你 提交于 2019-12-04 11:14:04
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 usage information collect2: error: ld returned 1 exit status Then I use " gdc -v hello.d -o hello " command, and try to find the root cause. It displays: ...... COLLECT_GCC_OPTIONS='-v' '-o' 'hello' '-shared-libgcc' '-mtune=generic' '-march=x86-64' /home/nan/x86_64-gdcproject-linux-gnu/bin/../libexec/gcc/x86_64-unknown-linux-gnu/4.9.0/collect2 -plugin

Elegant operator overloading in D

点点圈 提交于 2019-12-03 15:09:39
问题 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 opOpAssign(string op)(Vector vector) { X.opOpAssign!op(vector.X); // ERROR: no property "opOpAssign" for float Y.opOpAssign!op(vector.Y); // ERROR: ditto } } This would be beautiful code if it worked, seeing as it overloads all +=, -=, *=, etc.. operators in

crtbegin_so.o missing for android toolchain (custom build)

岁酱吖の 提交于 2019-12-03 14:06:59
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 problem is linking: When I build a project, I get this error: ld: crtbegin_so.o: No such file: No such file or directory This is true for regular c-only projects as well. Now I ran a quick find in my build directory, and found that the file (crtbegin_so.o) does exist within the sysroot I specified when I compiled gcc (or rather, when build-gcc.sh

DMD vs. GDC vs. LDC

主宰稳场 提交于 2019-12-02 17:51:02
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 thought so far: DMD Mature and well maintained Only one platform, 64 bit support is not good Not FOSS GDC Supports various platforms Has very mature optimizations, so it's fast? Out of date runtime? GCC so a good debugger support? LDC Supports various platforms LLVM, so it supports JITing? Has very mature optimizations, so it's fast? Not very well

Choosing Between GDC and DMD

时光总嘲笑我的痴心妄想 提交于 2019-12-01 15:41:30
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 world program. Here are my thoughts on pros so far: GDC : More platforms, run-time performance DMD : compilation-performance, more tested? What about debugging support through GDB - does it differ between GDC and DMD? Michal Minich Use DMD as it is the reference implementation and is most widely used. It is also the most up to date as new features

Choosing Between GDC and DMD

℡╲_俬逩灬. 提交于 2019-12-01 14:33:14
问题 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 world program. Here are my thoughts on pros so far: GDC : More platforms, run-time performance DMD : compilation-performance, more tested? What about debugging support through GDB - does it differ between GDC and DMD? 回答1: Use DMD as it is the