|
|
| Author |
Message |
|
|
tansengkai Familiar Face
Joined: 30 Nov 2007 Posts: 5
|
Posted: Fri Nov 30, 2007 8:21 am Post subject: GTK+ with Eclipse on Windows |
|
|
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
|
Posted: Fri Nov 30, 2007 4:37 pm Post subject: |
|
|
| 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
|
Posted: Sat Dec 01, 2007 2:14 pm Post subject: |
|
|
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
|
Posted: Sat Dec 01, 2007 6:09 pm Post subject: |
|
|
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
|
Posted: Sun Dec 02, 2007 12:31 am Post subject: |
|
|
| 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
|
Posted: Sun Dec 02, 2007 6:33 pm Post subject: |
|
|
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
|
Posted: Mon Dec 03, 2007 12:58 am Post subject: |
|
|
| thank you. I will try with MSYS. |
|
| Back to top |
|
 |
tansengkai Familiar Face
Joined: 30 Nov 2007 Posts: 5
|
|
| Back to top |
|
 |
|