FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

How to compile my gtkd program under Ubuntu

 
Post new topic   Reply to topic     Forum Index -> gtkD
View previous topic :: View next topic  
Author Message
samsam698



Joined: 10 Jan 2008
Posts: 63

PostPosted: Fri May 21, 2010 12:56 am    Post subject: How to compile my gtkd program under Ubuntu Reply with quote

Greetings to everybody!

I know this is a very silly qestion.If I was missing something in the gtkd page and gtkd forum,or D main page,forgive me.

I can compile and run a plain D(phobos2) app under Ubuntu,but I can't compile a gtkD app it seems that the gtkD lib is missing.Where /What are them?What's the command line look like?

Thanks a lot for your help in advance.

Regard,
Sam
Back to top
View user's profile Send private message
Epileg



Joined: 10 Sep 2009
Posts: 77

PostPosted: Fri May 21, 2010 10:10 am    Post subject: Reply with quote

You can try these Ubuntu deb packages with the latest GtkD and dmd2 release.

Best regards.
Back to top
View user's profile Send private message
samsam698



Joined: 10 Jan 2008
Posts: 63

PostPosted: Fri May 21, 2010 10:19 am    Post subject: Reply with quote

Epileg wrote:
You can try these Ubuntu deb packages with the latest GtkD and dmd2 release.

Best regards.


Sorry I did not make it clear.

What I want is not to compile gtkd ,rather I mean I have got the gtkD package in my pc,now how can compile my own d program written in gtkD.

Thanks a lot.

Regards,
Sam
Back to top
View user's profile Send private message
Epileg



Joined: 10 Sep 2009
Posts: 77

PostPosted: Fri May 21, 2010 10:34 am    Post subject: Reply with quote

Ok, on a plain text editor, as "gedit" (I prefer "geany") paste this code:

Code:
import std.stdio;
import gtk.MainWindow;
import gtk.Label;
import gtk.Main;

void main(string[] args)
{
   Main.init(args);
   MainWindow win = new MainWindow("Hello world!");
   win.setDefaultSize(220, 60) ;
   win.add(new Label("My fist GtkD program!"));
   win.showAll();

   Main.run();
}


save it as "hello.d", open a terminal, go to the directory you've saved the file and type:
Quote:
$ dmd hello.d -ofhello
$ ./hello


That's all!

Best regards.


Last edited by Epileg on Sat May 22, 2010 4:17 am; edited 1 time in total
Back to top
View user's profile Send private message
samsam698



Joined: 10 Jan 2008
Posts: 63

PostPosted: Sat May 22, 2010 12:12 am    Post subject: Reply with quote

Epileg wrote:
Ok, on a plain text editor, as "gedit" (I prefer "geany") paste this code:

Code:
import std.stdio;
import gtk.MainWindow;
import gtk.Label;
import gtk.Main;

void main(string[] args)
{
   Main.init(args);
   MainWindow win = new MainWindow("Hello world!");
   win.setDefaultSize(220, 60) ;
   win.add(new Label("My fist GtkD program!"));
   win.showAll();

   Main.run();
}


save it as "hello.d", open a terminal, got to the directory you've saved the file and type:
Quote:
$ dmd hello.d -ofhello
$ ./hello


That's all!

Best regards.

Thank you so much!Got it that in the terminal there is no need to add gtk libs and/or gtkd libs,just the same as ordinary d apps.But when under CodeBlocks,it complains that a lot of stuffs were missing,mainly related to gtkd,so I guess it actually complains no gtk(d) libs found.

Now my question is that,where are gtk libs and gtkD libs stored in the Ubuntu system.How do I need to configure the C::B to compile D programs written with gtkD lib.

Really appreciate for all your help!
Back to top
View user's profile Send private message
Epileg



Joined: 10 Sep 2009
Posts: 77

PostPosted: Sat May 22, 2010 4:13 am    Post subject: Reply with quote

Well, I've no idea about C::B. I just use geany for my smalls programs. If You find the correct way to setup C::B, please tell it here.

The GtkD libraries:
    /usr/lib/libgtkdgda.a
    /usr/lib/libgtkd.a
    /usr/lib/libgtkdgl.a
    /usr/lib/libgstreamerd.a
    /usr/lib/libgtkdsv.a

the headers are in:
    /usr/include/d/gtkd

and the Gtk+ libs are in:
    /usr/lib/gtk-2.0

Best regards.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> gtkD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group