Code::Blocks Forums

User forums => Help => Topic started by: codemania on January 16, 2007, 10:14:45 pm

Title: Codeblocks - D Language - DMD 1.00 + DUIT?
Post by: codemania on January 16, 2007, 10:14:45 pm
Hi!


I have installed D Language with codeblocks, It works well on XP but only with prompt window
(I have installed D Language on C:\dmd\ and C:\dm\)


Now I would like to use "D" with DUIT (a wrapper of Gtk+ for "D").

I installed "GTK+ 2 Runtime Environment" --> http://gimp-win.sourceforge.net/stable.html

I Unziped Duit to c:\

When I compile the file HelloWorld.d on c:\duit\demo\gtk, It gives me 1 error: "Module MainWindow cannot read the file "gtk\MainWindow.d"

HelloWorld.d
Code
module gtk.HelloWorld;

private import gtk.MainWindow;
private import gtk.Label;
private import gtk.Duit;

class HelloWorld : MainWindow
{
this()
{
super("Duit");
add(new Label("Hello World"));
showAll();
}
}

private import lib.Loader;

void main(char[][] args)
{

Linker.dumpFailedLoads();

Duit.init(args);
new HelloWorld();
Duit.main();

}


My "Global Compiler setting":
     Linker - phobos.lib
     Directories - compiler -> C:\dmd\src\phobos
     Directories - linker -> C:\dmd\lib
                              -> C:\dmd\bin
     Directories - Resource compiler -> C:\dmd\Includes


Help me please

Thanks

Mania
Title: Re: Codeblocks - D Language - DMD 1.00 + DUIT?
Post by: TDragon on January 16, 2007, 10:47:13 pm
I know next to nothing about D, but I suspect you need to add whichever DUIT directory contains "gtk\MainWindow.d" to the compiler directories in your build options.
Title: Re: Codeblocks - D Language - DMD 1.00 + DUIT?
Post by: stahta01 on January 17, 2007, 12:44:51 am
Link to download DUIT

http://svn.dsource.org/projects/dui/downloads/duit.tar.gz

I am downloading it now, along with lots of CVS wxWidgets updates, will be a while before I can test it.
(working on testing various versions of wxWidgets to see when wxWidgets fix/bug changed)

Tim S
Title: Re: Codeblocks - D Language - DMD 1.00 + DUIT?
Post by: stahta01 on January 17, 2007, 01:20:20 am
I installed "GTK+ 2 Runtime Environment" --> http://gimp-win.sourceforge.net/stable.html

I got my GTK+ files from two different sites, I believe the one above was one of them.

I got my devel files from here if I recall correctly.
gtk+-win32-devel : 2.10
http://gladewin32.sourceforge.net/modules/wfdownloads/viewcat.php?cid=14

I then tried to merger them, I have yet to use my install so it might not work.
I just was not sure if DUIT needs the devel files to work.

Tim S
Title: Re: Codeblocks - D Language - DMD 1.00 + DUIT?
Post by: codemania on January 17, 2007, 02:21:11 am
I have compiled a test default (without codeblocks) with GTK+ Runtime environment. It gives me an exe "DuitTest.exe" and works ok.
I have inserted C:\dmd\bin;C:\dm\bin and C:\Program Files\Common Files\GTK\2.0\bin on variable environment on control panel.
But I would like to work "Duit" with codeblocks.

Thanks

Title: Re: Codeblocks - D Language - DMD 1.00 + DUIT?
Post by: codemania on January 17, 2007, 02:43:35 am
I got It to work :D  :D

My new "Global Compiler setting":
                     Linker -> phobos.lib
                                  C:\duit\duit.lib

                     Directories - compiler -> C:\dmd\src\phobos
                                                       C:\duit\src
                     Directories - linker -> C:\dmd\lib
                                              -> C:\dmd\bin
                     Directories - Resource compiler -> C:\dmd\Includes


Title: Re: Codeblocks - D Language - DMD 1.00 + DUIT?
Post by: codemania on January 17, 2007, 04:35:21 pm
hi!


The HelloWorld in "Duit" appears. but...

1) ... the windows Prompt, when is running, show me a LIST of error (below is an exemple):
failed<\Program File\Command Files\gtk2.0\bin\libgtx-win32-2.0-0.dll> gtk_target_table_free

2) When I modify the new label, adding "èé" to the text "hello world - èé", it gives me a error "invalid UTF-8 sequence"

2) Windows design is like an old microsoft windows, not windows XP.


Mania
Title: Re: Codeblocks - D Language - DMD 1.00 + DUIT?
Post by: TDragon on January 17, 2007, 04:57:13 pm
2) Windows design is like an old microsoft windows, not windows XP.
GTK uses its own rendering engine for its window decorations and widgets. Read up on GTK "themes".