GNOME Bugzilla – Bug 379385
Does not compile on MinGW
Last modified: 2006-11-29 00:31:40 UTC
I am currently trying to compile Criawips HEAD on MinGW. I have made some progress, see my patch so far. I will stop for today, because I am unable to easily resolve a circular dependency that may not be necessary. It seems that src/dom uses cria_presentation_populate_from_xml_input, but src/io depends heavily on src/dom itself. Is it possible to resolve that one, or is it considered superfluous/evil to compile on Windows? ;-)
Created attachment 77155 [details] [review] First set of changes, more to come
After reading your patch I see the problem that it is for you (you are using -no-undefined). So please answer these questions and you will have an easy fix by hand. Why are you using -no-undefined (besides from "it's nice to have")? Is it a requirement for Win32? Would it be a problem to create a dummy library containing the cria_presentation_populate_from_xml_input() to have a library to link against and then not install the dummy library but the one from the io folder? If that doesn't work, we should both work on bug 363204 to add file opening based on GModule.
Your patch looked nice to me (at least it didn't break the ubuntu build on my working machine). I committed it so you have at least these changes in CVS now. 2006-11-26 Sven Herzberg <herzi@gnome-de.org> * configure.in, * copy-src/ccc/Makefile.am, * copy-src/cdebug/Makefile.am, * src/Makefile.am, * src/dom/Makefile.am, * src/io/Makefile.am, * src/utils/Makefile.am: committed first patch from Andreas Köhler to support MinGW builds (reference bug #379385)
Yes, -no-undefined is needed to create DLLs. Thanks for committing the first patch. Here comes the next one that should resolve the bug as it is described right now (does not compile) and we can move on to "does not work good enough". * src/win32 (this directory is contained in another patch, these are new files) creates two bootstrap dll's to avoid circular dependencies. They will not be installed. * speaking of which, libcriawips-app is a new shared library, because otherwise bootstrapping would be a lot harder with the static libcria-app (i would not know a solution). * removed two -Wl,--no-undefined's, what have they been good for, anyway? The following issues should be considered as semi-evil and be fixed before committing: * src/dom and src/io now add OBJECT_LIBS, because without them there would be unresolved symbols from libgnome-vfs resp. libgsf-gnome. * src/widgets/cria-main-window.c replaces XParseGeometry+friends by gtk_window_parse_geometry. There could be problems, maybe treating G_OS_UNIX|G_OS_WIN32 differently solves them. So I managed to compile and install criawips successfully. Running it fails early, patches will follow.
Created attachment 77315 [details] [review] Second part of Makefile.am adjustments
Created attachment 77316 [details] [review] src/win32 files
2006-11-29 Sven Herzberg <herzi@gnome-de.org> * configure.in, * copy-src/ccc/Makefile.am, * doc/reference/Makefile.am, * src/Makefile.am, * src/dom/Makefile.am, * src/io/Makefile.am, * src/rendering/Makefile.am, * src/utils/Makefile.am, * src/widgets/Makefile.am, * src/widgets/cria-main-window.c, * src/win32/Makefile.am, * src/win32/dummy.la, * src/win32/libcriawips-app.def, * src/win32/libcriawips-io.def: added win32 compile support. Patch from Andreas Köhler. Fixes bug #379385.