Re: [gnet-devel] Compiling Gnet



On Fri, 13 Jun 2008 you wrote:

> Hi, I am rather new to gnet, and although I have been working with it for a
> few months, there is one problem that continually stumps me. I am unable to
> compile gnet on Windows. I have tried using MSYS to no avail, and have even
> attempted cross-compiling from linux with mingw32, also no success. If
> anyone could help me in this regard, and how to compile apps that use gnet
> assuming I can get gnet running on Windows, I would be most appreciative.

Hi Nate,

I'm new to gnet too, and I'm sure there are people on this list who'd be able
to explain much better than I can, but I'm happy to recount my experience of
getting GNet compiled on Windows using MinGW, in case it's of some use.

Personally I installed GTK from here:
http://sourceforge.net/projects/gladewin32/

and MinGW from here: http://www.mingw.org/

I found I had to alter my PATH, LIB and INCLUDE system variables manually for
these, but if you can compile other GTK software using MinGW then that's
probably fine.

Having done that, I had to change the makefile included in the Windows gnet
2.0 source snapshot from the gnet website slightly. The makefile includes the
following lines:

INCLUDE = -I./ `pkg-config --cflags glib-2.0`
LIBS = `pkg-config --libs glib-2.0` -lws2_32

Which I had to change to:

INCLUDE = -I./ -I"%GTK_BASEPATH%\include\glib-2.0"
-I"%GTK_BASEPATH%\lib\glib-2.0\include"
LIBS = -L"%GTK_BASEPATH%\lib" -lglib-2.0 -lintl -lws2_32

(note that my email client has probably split the INCLUDE line above into
two: this should be all on one line).

I'm not sure if this is something I did wrong, but I couldn't get MinGW gcc
to call pkg-config directly, which is why this change was necessary. You may
find it works okay for you as it is.

Finally, I compiled the gnet dll from the Windows command prompt (not
Cygwin!), moving into the gnet source folder and typing:

mingw32-make.exe

This should generate gnet-2.0.dll and gnet.def inside the same folder that
you can then use with other applications.

I don't know if this will be helpful, but if you have any trouble, I would be
happy to send you a compiled version of the dll which I supposed should then
work fine with other programs.

Regards,

David
-- 
Website: http://www.flypig.co.uk



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]