[gtkmm] gtkmm and MSVC 2003



Hi everyone,

I'm desperately trying to compile some simple programs using gtkmm
under MSVC .net 2003. I've cut the program down to an absolute minimum
of:

#include <gtkmm.h>

int main(int argc, char *argv[])
{
  Gtk::Main kit(argc, argv);

  Gtk::Window window;

  Gtk::Main::run(window);

  return 0;
}

This fails to compile with two errors and 184 warnings of C4250 to do
with inheritance via dominance which I'm not familiar with. The errors
are both in sigc++/functors/slot.h

Here is an example of one of the warnings and the errors:

d:\GTK\include\gtkmm-2.4\gtkmm\accellabel.h(163): warning C4250:
'Gtk::AccelLabel' : inherits
'Gtk::Object::Gtk::Object:
:destroy_notify_' via dominance
d:\GTK\include\sigc++-2.0\sigc++\functors\slot.h(122): error C2951:
template declarations are only permitted at global or namespace scope
d:\GTK\include\sigc++-2.0\sigc++\functors\slot.h(122): error C2059:
syntax error : 'template'

I'm using the prebuilt packages from here:
http://www.pcpm.ucl.ac.be/~gustin/win32_ports/ <http://www.pcpm.ucl.ac.be/%7Egustin/win32_ports/> which currently use
version 2.0.3 from the pkg-config output. The program compiles
perfectly using gcc within Msys, but fails in MSVC. Both environments
compile bare gtk+ apps perfectly.

I also tried to build the latest 2.0.5 version of libsigc++2 from
cvs.gnome.org <http://cvs.gnome.org>, but that didnt go too well either. When I loaded the
.vcproj file into MSVC and tried to build, there were a load of files
missing. I found them with .m4 extensions in macros directories, but
I'm unfamiliar with m4 and running them through a simple "m4 slot.h.m4
> slot.h" and then placing that file in the correct location caused a
load more errors to do with sigc not being in the global namespace. I
tried running autogen.sh, ac.local, and many other commands to set it
up properly under cygwin but I couldn't seem to do it.

Please tell me I've missed something, or point me to a how-to I passed
by somewhere or even something in the archive here. Basically any help
would be appreciated.



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