GNOME Bugzilla – Bug 112809
Add support for Visual Studio .NET 2003
Last modified: 2004-12-22 21:47:04 UTC
This patch adds support for Visual Studio .NET 2003.
Created attachment 16442 [details] [review] Patch to add support for Visual Studo .NET 2003
Created attachment 16443 [details] project files for Visual Studio .NET 2003
Please close either this bug or bug 112776.
Nevermind. I've noticed that the other patch is meant for libsigc++ and reassigned it. The changes look good. I'll try to apply them in the next few days. Thanks.
In your patch, you try to circumvent the treeview bug that was detected a few days ago (http://mail.gnome.org/archives/gtkmm- list/2003-April/msg00250.html) by explictly calling the appropriate CellRenderer, for example in demos/gtk- demo/example_treeview_editable_cells.cc. Of course, your patch also fixes the problem with mingw32 but wouldn't it be more appropriate to fix the bug in the library source code instead of patching the examples ? I had a look at the problem last week but I thought it was a mingw32 compiler bug (gtkmm-2.2 works as expected on my redhat 9 box). If it does not work either with Visual.Net, this means that there's something wrong with treeviews on win32 !
Oh, I thought it just didn't compile with MSVC++ (it used to give problems with the SUN compiler before they fixed it.) Also, that code does not seem complete - it needs to connect to signal handlers to store the edited value. But I'm applying it anyway so that Cedric can check that the _DLL changes in the *config.in files don't break something for him.
Yes, I think there may be a fundmental problem with type matching template arguments in Treeview. However, I could not figure out how to fix the problem in the library. Yes, the example code demos/gtk- demo/example_treeview_editable_cells.cc is incomplete. I found this out last night when was going the the code again. I will fix this and submit another patch after we get the details of the patch worked out and applied. This same goes for examples/book/treeview/editable_cells/examplewindow.cc. The bool field in not properly using the Gtk::CellRendererToggle. This has to be manually created and attached to the column along with a callback for signal_toggled.
Actually, we have the same symptom with CellRendererPixbuf in demos/gtk-demo/example_stockbrowser.cc. That's the reason why there is a WIN32 related #ifdef somewhere in the code. Whatever the column type, it seems that it is always implicitly converted to a text, except if you call the appropriate cell renderer. I have no idea where this comes from. Using the testing branch of gcc-3.2.2 on mingw does not solve the problem. According to the recent thread http://mail.gnome.org/archives/gtkmm- list/2003-April/msg00267.html, this has also been observed on debian and gentoo. I guess fixing this bug should be top priority.
Could you open a separate bug for that treeview thing? Cedric, could you check that these MSVC++ .Net 2003 changes in cvs have not broken your mingwin build? I noticed that some *_DLL macros were removed from *config.in files and I wondered if you need them.
Cedric, I CCed you on this bug, because you might not have seen my last comment automatically.
By the way, I expect to release a new gtkmm when I know that it still works with cygwin.
Current cvs builds fine with mingw32. Go ahead and release ! I guess we will try to fix this treeview bug for the next one.
John, are these files meant to go in a separate MSVC_Net2003 directory, like for libsigc++? Could you rename the project files to something msvc_net2003-specific, as we have for libsigc++. The examples/tests files are not so important, but I want to clearly distinguish the main project files. Please mention the filename when attaching files. By the way, the patch has been applied - we just need to deal with the project files.
Please respond.
Created attachment 17281 [details] VisualStudioNet 2003 project files
Sorry for the late reply!! I had to unexpectedly go on travel for work. I have to spend far to much time on travel. It makes it hard to keep up with the list. I have attached a new set of project files. The filename is win32_net2003.zip. This file should address conform to your request. Let me know if this is a problem.
How many times do I need to ask? "Please mention the filename when attaching files." I have no idea what kind of file that is.
When I open this sln file, the solution explorer looks good, but when I try to open any of the files in the panel it says "the system cannot find the path specified." More specifically, the ../examples/arrow/ folder for your project also as a direction subfolder with the .vcproj in it. The direction.cc file that I have is not in a separate subfolder. I wonder whether or not we have the same tree structure.
how do you apply attachment 16442 [details] [review]?? I'm having errors with wint_t in MSVC .NET when trying to compile. Thanks for helping
crs8@lehigh.edu, please be more precise.
This still isn't working. We are trying to compile the project libglibmm in msvc .NET, and below are the errors we are getting All of the actual errors pertain to the macro GTKMM_USING_STD() which is not defined anywhere in any of the files in the solution. Thanks anybody for helping. Chris Compiling... wrap_init.cc c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(177) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(179) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(181) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(183) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(185) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(187) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(189) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(191) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(193) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(195) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(197) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(199) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(201) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(203) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\unicode.h(205) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning) c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(32) : error C2039: 'bidirectional_iterator_tag' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(32) : error C2873: 'bidirectional_iterator_tag' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(33) : error C2039: 'reverse_iterator' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(33) : error C2873: 'reverse_iterator' : symbol cannot be used in a using- declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(34) : error C2039: 'string' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(34) : error C2873: 'string' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(35) : error C2039: 'istream' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(35) : error C2873: 'istream' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(36) : error C2039: 'ostream' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(36) : error C2873: 'ostream' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(42) : error C2039: 'random_access_iterator_tag' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\ustring.h(42) : error C2873: 'random_access_iterator_tag' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\value_custom.h(31) : error C2039: 'nothrow' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\value_custom.h(31) : error C2873: 'nothrow' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\fileutils.h(37) : error C2039: 'input_iterator_tag' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\fileutils.h(37) : error C2873: 'input_iterator_tag' : symbol cannot be used in a using- declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\fileutils.h(38) : error C2039: 'string' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\fileutils.h(38) : error C2873: 'string' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\main.h(34) : error C2039: 'vector' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\main.h(34) : error C2873: 'vector' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\iochannel.h(37) : error C2039: 'string' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\iochannel.h(37) : error C2873: 'string' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\markup.h(33) : error C2039: 'map' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\markup.h(33) : error C2873: 'map' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\module.h(30) : error C2039: 'string' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\module.h(30) : error C2873: 'string' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(39) : error C2039: 'forward_iterator_tag' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(39) : error C2873: 'forward_iterator_tag' : symbol cannot be used in a using- declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(40) : error C2039: 'random_access_iterator_tag' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(40) : error C2873: 'random_access_iterator_tag' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(41) : error C2039: 'distance' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(41) : error C2873: 'distance' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(42) : error C2039: 'copy' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(42) : error C2873: 'copy' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(43) : error C2039: 'vector' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(43) : error C2873: 'vector' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(44) : error C2039: 'deque' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(44) : error C2873: 'deque' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(45) : error C2039: 'list' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\containerhandle_shared.h(45) : error C2873: 'list' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\shell.h(34) : error C2039: 'string' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\shell.h(34) : error C2873: 'string' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\spawn.h(33) : error C2039: 'string' : is not a member of 'operator``global namespace''' c:\gtk\gtkmm-2.2.3\glib\glibmm\spawn.h(33) : error C2873: 'string' : symbol cannot be used in a using-declaration c:\gtk\gtkmm-2.2.3\glib\glibmm\thread.h(781) : warning C4800: 'gboolean' : forcing value to bool 'true' or 'false' (performance warning)
Okay, this whole forum needs to be removed and tossed into the lake of fire. I started from scratch and got gtkmm 2.2 compiling and running in MSVC 2003 .NET I'm working on a tutorial and I'll post it when I'm done. Chris
OK. With new project files, I guess? Consider patching the install chapter in the "book" or just updating the MSVC++ .NET README if it's lengthy and likely to change often.
Created attachment 18902 [details] This are my VisualStudio NET 2003 project files, it's a .tar.gz archive. There is an detailed README inside how to compile it with VisualStudio.
Created attachment 18903 [details] [review] This is a small and simple patch to avoid lot of of VisualStudio NET warnings.
Created attachment 18904 [details] The VisualStudio NET 2003 buildlog of gtkmm.
Created attachment 18905 [details] The VisualStudio NET 2003 buildlog of glibmm.
Thank you, but patches _must_ patch the ChangeLog. You should also comment your code, to explain what you are doing. I can then apply this next week.
Created attachment 18922 [details] [review] Small patch to avoid lot of of VisualStudio NET warnings with ChangeLog entry.
Created attachment 19025 [details] [review] Patch for VisualStudio template bug; TreeView::append_column_editable work now as expected
re. Patch for VisualStudio template bug: Looks good. I will try to apply all this and release a new version next week.
re. VisualStudioNet 2003 project files: Are these meant to be in a separate directory at the top-level, or in the various existing (gtk, atk, pango, etc) directories? I would like to keep them in a separate top-level MSVC_net2003 directory, but I don't mind if there is a hierarchy of directories inside that.
warnings and TreeView::append_column_editable() patches applied in cvs. Well done.
>Are these meant to be in a separate directory at the top-level Yes! I thought that's what you want :-)
OK. I have added this to cvs. Please try it out and tell me if it's ready for a new tarball release.
Or you can check the gtkmm 2.2.6 tarball.
Frank, If you plan to provide a windows installer for your Visual Studio port of gtkmm, why don't we join forces ? Currently my installer for the mingw32 distribution is quite monolithic: you have to choose between a big installer for the full distribution or a smaller one if you're interested in the runtime only. Both installer are created InnoSetup. I'm thinking about switching to NSIS (http://nsis.sourceforge.net) and implement some kind of net installer, like for the cygwin distribution, where packages can be separately downloaded, installed and updated. It would then be piece of cake to add your Visual Studio gtkmm DLLs and import libraries, along with ports of libglademm or other gtkmm-related libraries (gtkglextmm). What do you think ? Maybe you have some experience with NSIS, or somebody else wants to join ?
Sounds very sensible.
I'm assuming that this works. Reopen this bug if necessary. Please discuss the installer on the list.
By the way, the MSVC++ version of this code (ifdefed in gtkmm 2.2) is now the default in gtkmm 2.3. That's a first step to tweaking it some more so it can be used for the ComboBox. Thanks again.