GtkD 2.0 released, Gtk+ 3 with D.

Jordi Sayol g.sayol at yahoo.es
Sat Oct 6 07:05:04 PDT 2012


Al 04/10/12 02:32, En/na Tommi ha escrit:
> On Wednesday, 26 September 2012 at 18:48:41 UTC, Mike James wrote:
>> I tried the install detailed on the github page and got the following error:
>>
>>
>> C:\D\dmd2\gtkD2\src>dgen
>> build\gtkD.d(612): Error: module SourceBuffer is in file 'gsv\SourceBuffer.d' wh
>> ich cannot be read
>> import path[0] = C:\D\dmd2\windows\bin\..\..\src\phobos
>> import path[1] = C:\D\dmd2\windows\bin\..\..\src\druntime\import
> 
> 
> Using those same instructions...
> https://github.com/gtkd-developers/GtkD/wiki/Installing-on-Windows
> ...I only manage to get this error (after ~10 seconds):
> 
> D:\Documents\GitHub\GtkD\src>dgen.exe
> Fatal Error: Out of memory
> 
> Even though Task Manager shows only negligible increase in memory.
> 

I got the same error in wine:
"Fatal Error: Out of memory"

I override it by compiling first to object files and then building the library:
dgen.d:
----
import std.path;
import std.file;
import std.process;

void main()
{
	std.file.write("build.rf", listFiles(".d"));
	system("dmd -c -op @build.rf");

	std.file.write("build.rf", listFiles(".obj"));
	system("dmd -lib -ofGtkD @build.rf");

	std.file.remove("build.rf");
}

string listFiles(string file_ext)
{
	string files;
	auto entries = dirEntries("src", SpanMode.breadth);

	foreach(DirEntry entry; entries) {
		if(entry.isDir == false && entry.name.extension == file_ext) {
			files ~= entry.name ~ " ";
		}
	}

	return files;
}
----

Compiling and executing from GtkD root directory.

Now "GtkD.lib" is generated, and properly compiles gtkd programs:
$ wine dmd.exe -L C:/D/dmd2/windows/lib/GtkD.lib HelloWorld.d

BTW. What's the right way to add "-L C:/D/dmd2/windows/lib/GtkD.lib" to "sc.ini" file?

Regards,
-- 
Jordi Sayol


More information about the Digitalmars-d-announce mailing list