I’ve been editing this gdc.spec in such a way that the resulting D compiler works correctly with your existing FC4 gcc installation. As the gdc patches don’t yet work on the gcc version of FC5, I didn’t repeat it for FC5 yet.
So I announce the direct availability of a gdc package for Fedora Core 4 and the stuff for building it (like the source RPM) yourself. Please do not consider this package as an official package. It’s not, I repeat, it’s not an official package. And I’ll repeat it again: it’s not an official package.
Please join the D.gnu newsgroup if you are interested in building packages for other distributions.
[root@zeus ~]# rpm -e gdc
[root@zeus ~]# gdc
-bash: /usr/bin/gdc: No such file or directory
[root@zeus ~]# rpm -Uvh /usr/src/redhat/RPMS/i386/gdc-0.17-0.i386.rpm
Preparing… ########################################### [100%]
1:gdc ########################################### [100%]
[root@zeus ~]# gdc test.d
[root@zeus ~]# ./a.out
Yes
[root@zeus ~]# cat test.d
import std.string;
extern (C) int strcmp(char* string1, char* string2);
int myDfunction(char[] s) {
return strcmp(std.string.toStringz(s), “foo”);
}
int main () {
if (myDfunction (“foo”) == 0)
printf (“Yes\n”);
else printf (“No\n”);
return 1;
}
[root@zeus ~]# cat /etc/issue | head -n 1
Fedora Core release 4 (Stentz)
[root@zeus ~]#