Re: gtkmm2.4 and MSVC (again)



m h wrote:

looking briefly thru this code, it hints at something
i've been suspicious about the whole time.  the
static/global variables Glib::quark_,
Glib::quark_cpp_wrapper_deleted_, and
Glib::glibmm_null_pointer.
i've always gotten warnings with these.  some multiple
definitions, some dll-inconsistent linkages, etc.
any idea on how to fix these?
could these be causing the problem with not being able
to find the wrapper?

You're absolutely right. There are some inconsistencies in the way
global variables are dll exported (gendef <->
__declspec(dllimport/dllexport) with GLIBMM_API #dedfines).

I think I found the solution. Please try the following :

1. Replace the gtkmmconfig.h and glibmmconfig.h files with the ones I
will send you privately (other interested people: please email me to get
the files). Carefully check your glibmm and gtkmm project properties,
especially the "Additional Include Directories" entry, and copy the new
config files into the appropriate directory (glib or MSVC_Net2003)
2. Define the glibmm_COMPILATION and DLL_EXPORT variable in the MSVC
glibmm project, gtkmm_COMPILATION and DLL_EXPORT in the gtkmm project.
3. Recompile glibmm and gtkmm

Hopefully, no more linker warnings with "inconsistent dll exporting" or
"multiply defined symbols".

As a test, compile and run example_stock. If the stock icons are
correctly displayed, this means that global variables in stock.h were
correctly dllexported by gendef.

All examples compile/run file, with the exception of the gtk-demo where
compilation fails at line 164

type_slotDo slot=row[columns.slot];

Oviously, operator[] does not return the expected
sigc::slot<Gtk::Window*>. It works with the other columns though
(filename, title,...).

Cedric




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