building glib on windows

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

building glib on windows

jcupitt
Hi everyone,

I'm trying to make my own 64-bit glib DLLs for Windows users. I'm
cross-compiling from linux with jhbuild. It seems to be working,
except that VS users can't link to the libraries I'm making.

It looks like I need to generate .def and .lib files. Does anyone know
the recommended way to do this? I see the (now too out of date,
unfortunately) official ones have these files, but I can't see a
simple way to make them myself :-( Is there some script to run that
I've not been able to find?

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: building glib on windows

Ignacio Casal Quinteiro
Cheers.

On Tue, Nov 3, 2015 at 3:26 PM, <[hidden email]> wrote:
Hi everyone,

I'm trying to make my own 64-bit glib DLLs for Windows users. I'm
cross-compiling from linux with jhbuild. It seems to be working,
except that VS users can't link to the libraries I'm making.

It looks like I need to generate .def and .lib files. Does anyone know
the recommended way to do this? I see the (now too out of date,
unfortunately) official ones have these files, but I can't see a
simple way to make them myself :-( Is there some script to run that
I've not been able to find?

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list



--
Ignacio Casal Quinteiro

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: building glib on windows

jcupitt
On 3 November 2015 at 14:34, Ignacio Casal Quinteiro
<[hidden email]> wrote:
> have a look at this:
> https://github.com/nice-software/gtk-win32

Hi Ignacio, that looks great, but unfortunately I need to build on
linux and cross-compile :-(

Does anyone have a link to linux-hosted win64 gtk build system I could
have a look at?

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: building glib on windows

Ignacio Casal Quinteiro
Hi,

if you need msvc builds you need to build them with msvc. Mixing runtimes while it could work
it might deal to unexpected problems.

Regards.

On Tue, Nov 3, 2015 at 3:40 PM, <[hidden email]> wrote:
On 3 November 2015 at 14:34, Ignacio Casal Quinteiro
<[hidden email]> wrote:
> have a look at this:
> https://github.com/nice-software/gtk-win32

Hi Ignacio, that looks great, but unfortunately I need to build on
linux and cross-compile :-(

Does anyone have a link to linux-hosted win64 gtk build system I could
have a look at?

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list



--
Ignacio Casal Quinteiro

_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: building glib on windows

Tim-Philipp Müller
In reply to this post by jcupitt
On Tue, 2015-11-03 at 14:40 +0000, [hidden email] wrote:

Hi John,

> have a look at this:
> > https://github.com/nice-software/gtk-win32
>
> Hi Ignacio, that looks great, but unfortunately I need to build on
> linux and cross-compile :-(
>
> Does anyone have a link to linux-hosted win64 gtk build system I
> could
> have a look at?

The build system GStreamer uses for this (cerbero) should be able to do
that (our windows build bots do that):

http://cgit.freedesktop.org/gstreamer/cerbero/

Documentation might be a bit sparse, pop into #gstreamer on FreeNode if
you have any questions.

Binaries (incl. glib) here:
http://gstreamer.freedesktop.org/data/pkg/windows/

People do use these also with MSVC projects, and it mostly works fine
at least for GStreamer use cases, but as Ignacio mentioned you might
run into unexpected issues when mixing runtimes.

 Cheers
  -Tim
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list
Reply | Threaded
Open this post in threaded view
|

Re: building glib on windows

jcupitt
Hi Tim,

On 3 November 2015 at 14:53, Tim-Philipp Müller <[hidden email]> wrote:
> The build system GStreamer uses for this (cerbero) should be able to do
> that (our windows build bots do that):
>
> http://cgit.freedesktop.org/gstreamer/cerbero/

From reading the sources, it looks like cerbero/ide/vs/genlib.py is
run over all DLLs produced by all recipes. This class first runs
`gendef` to make the .def file, then uses `dlltool` to make the .lib
file from that.

I'll trying hacking up something like this in bash and run it as a
final pass before packaging.

I realize there are issues around sharing resources created by
different C runtimes, but I think in my case at least (node.js on
win64 using a gobject-based library) I'll be OK.

Thank you all very much again!

John
_______________________________________________
gtk-devel-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-devel-list