GTK+ Forums Forum Index GTK+ Forums
Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

GTK+ with Eclipse on Windows

 
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion
Author Message
tansengkai
Familiar Face


Joined: 30 Nov 2007
Posts: 5

PostPosted: Fri Nov 30, 2007 8:21 am    Post subject: GTK+ with Eclipse on Windows Reply with quote

HI,

I have install gtk+ glade on windows and i wish to compile using eclipse IDE.

First i create a project, set include path to
C:\Program Files\Common Files\GTK\2.0\include
C:\Program Files\Common Files\GTK\2.0\include\gtk-2.0
C:\Program Files\Common Files\GTK\2.0\include\cairo
C:\Program Files\Common Files\GTK\2.0\include\glib-2.0
C:\Program Files\Common Files\GTK\2.0\include\pango-1.0
C:\Program Files\Common Files\GTK\2.0\include\atk-1.0
C:\Program Files\Common Files\GTK\2.0\lib\gtk-2.0\include
C:\Program Files\Common Files\GTK\2.0\lib\glib-2.0\include

and lib path to
C:\Program Files\Common Files\GTK\2.0\lib

Then i compile, there is no problem with the header, but i think the problem is come from linker to library.

The error message is like below:-
Settings/SKTan/workspace/test1/Debug/../src/test1.cpp:13: undefined reference to `gtk_widget_show'
:C:/Documents and Settings/SKTan/workspace/test1/Debug/../src/test1.cpp:15: undefined reference to `gtk_main'

Any know how to solve this? Thanks in advance.
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 428
Location: Portland, OR USA

PostPosted: Fri Nov 30, 2007 4:37 pm    Post subject: Reply with quote

I don't work with eclipse, but is there a way to see what it's using to compile it?
Back to top
tansengkai
Familiar Face


Joined: 30 Nov 2007
Posts: 5

PostPosted: Sat Dec 01, 2007 2:14 pm    Post subject: Reply with quote

it using mingw32 to compile. but there is also some problem with eclipse makefile which i do not understand. i need more time to learn with eclipse.

what method ppl use to compile gtk under windows?
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 428
Location: Portland, OR USA

PostPosted: Sat Dec 01, 2007 6:09 pm    Post subject: Reply with quote

I've only dabbled, but I compile my GTK+ applications in Windows the same way I do in Linux--by running gcc myself or from a typical POSIX install script (configure, make, make install). I do both of these using MinGW/MSYS.

You may want to read this post: http://www.gtkforums.com/about894.html
Back to top
tansengkai
Familiar Face


Joined: 30 Nov 2007
Posts: 5

PostPosted: Sun Dec 02, 2007 12:31 am    Post subject: Reply with quote

i see, but using Msys is hard, you need to install every component to start. download dll and exe file from glade is another problem with me, i don't know where to put those file so that my compiler can find it.
Back to top
Micah Carrick
Never Seen the Sunlight


Joined: 21 Sep 2005
Posts: 428
Location: Portland, OR USA

PostPosted: Sun Dec 02, 2007 6:33 pm    Post subject: Reply with quote

Unfortunately, from what I've read, developing GTK+ in Windows is not as easy as other OS's. Be it MSYS, Cygwin, Visual Studio, Bloodshed Dev++, or Eclipse-- you need to know or figure out what all the dependencies are that you need, how you compiler/linker will find them and what linker flags it uses.

There are some GTK+ Development installers out there, however, I don't have any experience using them.
Back to top
tansengkai
Familiar Face


Joined: 30 Nov 2007
Posts: 5

PostPosted: Mon Dec 03, 2007 12:58 am    Post subject: Reply with quote

thank you. I will try with MSYS.
Back to top
tansengkai
Familiar Face


Joined: 30 Nov 2007
Posts: 5

PostPosted: Tue Dec 04, 2007 5:55 am    Post subject: Reply with quote

I success my compilation under Msys. Below site is useful info to compile under Win32.

http://www.mingw.org/MinGWiki/index.php/GladeGuide
Back to top
Display posts from previous:   
Post new topic   Reply to topic    GTK+ Forums Forum Index -> General GTK+ Discussion All times are GMT
Page 1 of 1

 


Powered by phpBB © 2001, 2005 phpBB Group
CodeBB 1.0 Beta 2
Protected by Anti-Spam ACP