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

linking gtkD on Win and Linux

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



Joined: 11 Jul 2008
Posts: 9

PostPosted: Mon Feb 15, 2010 12:48 pm    Post subject: linking gtkD on Win and Linux Reply with quote

Hi!

I am new in gtkD programming, and would like to make a cross-platform GUI application with gtkD. I successfully compiled gtkD with dsss, but I got linker errors both on Linux and Windows when I would like to compile a simple demo inCode::Blocks. Crying or Very sad

Is it possibble to build gtkD based application using Code::Blocks? I got the following libs (Win):

DD-atk.lib
DD-cairo.lib
DD-gdk.lib
DD-gdkpixbuf.lib
DD-gio.lib
DD-glade.lib
DD-glib.lib
DD-gobject.lib
DD-gthread.lib
DD-gtk.lib
DD-gtkc.lib
DD-pango.lib

I added them to Code::Blocks, but the following hello word application always has linker errors:

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

void main(string[] args)
{
}


The errors:

Code:
Symbol Undefined _D3gtk4Main12__ModuleInfoZ|
Symbol Undefined _D3gtk5Label12__ModuleInfoZ|
Symbol Undefined _D3gtk10MainWindow12__ModuleInfoZ|


I do not understand, what can be the problem. Please help me to solve this.
Back to top
View user's profile Send private message
Mike Wey



Joined: 07 May 2007
Posts: 428

PostPosted: Mon Feb 15, 2010 1:18 pm    Post subject: Reply with quote

Is phobos in the list of libraries?
Back to top
View user's profile Send private message
sheridan



Joined: 11 Jul 2008
Posts: 9

PostPosted: Mon Feb 15, 2010 1:26 pm    Post subject: Reply with quote

Phobos do need to add at the project link options. I had compiled a lot of projects already using this configuration.

The problem is the same on Linux and Windows. I think the problem is that the libs are build with dsss, but I use Code::Blocks. But I like this IDE, I do not want to use dsss to build my project.

Do I need maybe only one compact library. eg.: libgtkD.a??? If yes, how can I build it?
Back to top
View user's profile Send private message
GG



Joined: 05 Nov 2009
Posts: 18

PostPosted: Tue Feb 16, 2010 11:28 am    Post subject: Reply with quote

I have never use Code::Blocks but if you want only one compact library GtkD.lib:
For Windows follow this http://dsource.org/forums/viewtopic.php?t=5129

For Linux, use make: there is GNUmakefile in gtkD folder.
Code:
make all

Code:
make install

You will get libgtkd.a, libgtkdgl.a, libgtkdsv.a, then maybe you can link them to Code::Block
Back to top
View user's profile Send private message
Epileg



Joined: 10 Sep 2009
Posts: 77

PostPosted: Wed Feb 24, 2010 3:59 pm    Post subject: Reply with quote

For windows, there is a topic on this forum where it's clearly explained how to link gtkd on windows without dsss.

On Linux you can use "make" to build it without dsss, or download these three deb files: gtkd_1.3.2+svn763-0_i386.deb, gtkd-doc_1.3.2+svn763-0_all.deb and dmd_2.040-0_i386.deb.

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