You can never trust using prebuilt C++ libraries made with any other version of any compiler than precisely the one that you’re using. The C++ ABI is not sufficiently standardised to trust cross-compatibility. It’s often not even safe to trust prebuilt libraries even if you do know they were made with the right compiler version, unless you also know exactly which #defines and command-line flags were in effect at the time it was built.
(And since it’s often hard to be sure of all of that, especially with patches and updates occasionally breaking things behind the scenes, it’s usually better to just not trust prebuilt libraries at all.) From: gtkmm-list [mailto:gtkmm-list-boun...@gnome.org] On Behalf Of Edscott Wilson Sent: Tuesday, September 10, 2013 7:43 AM To: Alcione Ferreira; gtkmm-list@gnome.org Subject: Re: Glib::ustring in mingw Problem solved, more or less. The issue is with gcc compiler. Apparently the gtkmm bundle package is build with gcc-4.6.2, and some hack or other is done to get glib/glibmm to compile. If you try to compile and link your program with a different gcc version (I tried 4.7.0 and 4.7.2) the ustring constructor in glibmm is broken and will invariably lead to SEGV. Using a mingw with the packaged compiler and tools, there is no problem with Glib:ustring. So the quick fix is to install mingw with the packaged gcc (4.6.2) and use this to build gtkmm packages. Plain gtk+ will most probably work correctly with gcc-4.7.2 or later. 2013/9/9 Alcione Ferreira <alcione.som...@gmail.com> Only confirmed! Managed to solve your problem? Só confirmando! Conseguiu resolver seu problema? --- 2013/9/3 Edscott Wilson <edscott.wilson.gar...@gmail.com> Thank you! I will try your suggestion. 2013/9/2 Alcione Ferreira <alcione.som...@gmail.com> -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Em 02-09-2013 19:42, Edscott Wilson escreveu: > Hey, > > If I use Glib::ustring in Linux, everything works fine. But when I compile > the program under mingw in windows, segv invariably follows any > GLib::ustring. Methinks the culprit would be the internal utf-8 conversions > which distiguish Glib:ustring from std:string. > > If I try to specify locale with: > |std::locale::global(std::locale(""));| > Will abort the program (invalid locale, windows will argue). The only > locale that seems to work is "C". > > Further information: the program in question is also using glade to build the > gtk window framework. Maybe the glade gettext stuff screws things up with > Glib::ustring? Usage of giomm and other functions which rely on > Glib:ustring will also lead to segv. > > Any ideas or pointers on the subject will be greatly appreciated. Boa noite! Tive problemas com a convers ̄o de tipos no in■cio mas o Glib::ustring resolveu tudo sem problemas, a nica altera ̄o que tive que fazer para sistemas em win32 foi acrescentar a biblioteca correspondente ao SO <windows.h>. Segue o techo que usei para testar: #if defined(__WIN32__) || defined(__WIN__) #include <windows.h> #endif Para esclarecer tenho um sistema de Fluxo de Caixa rodando em ambos os sistemas feito em GTKmm com acesso a banco de dados MYSQL e POSTGRESQL. Att. Good night! I had problems with type conversion in the beginning but the Glib :: ustring solved everything without problems, the only change I had to do was to add win32 systems in the library corresponding to SO <windows.h>. Follows the techo I used to test: # if defined (__WIN32__) | | defined (__WIN__) # include <windows.h> # endif To have a clear system cash flow running on both systems made ??in GTKmm with access to MYSQL database and POSTGRESQL. Att - -- Paz e Bem! Alcione Ferreira Sombraᆴ 101080 [http://www.alcionesytes.net/] - ----------------------------------------------- Liberdade e conhecimento ao alcance de todos. Office Escritrio - http://www.openoffice.org.br/ Navegador Firefox - http://www.mozilla.org.br/ Email Thunderbird - http://www.mozilla.org.br/ - --------------------------------------------------------------- Linux user number 432030 of http://counter.li.org/ - --------------------------------------------------------------- ICQ: 377035698 Jabber: ksomb...@jabber.org MSN: alcione.som...@hotmail.com - --------------------------------------------------------------- Curriculum: http://lattes.cnpq.br/0545256741852110 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iEYEARECAAYFAlIlWlYACgkQ3m8gMw0vje8rsQCghrsGF7EUgmotLNOaI9m1UpAV e/IAn0Bk7n19EezZWyXRSFPXol0n046D =yiEc -----END PGP SIGNATURE----- _______________________________________________ gtkmm-list mailing list gtkmm-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtkmm-list -- ------------------------------------------------------------------------------------ Dr. Edscott Wilson Garcia Applied Mathematics and Computing Mexican Petroleum Institute -- Paz e Bem! Alcione Ferreira Sombra® 101080 [http://www.alcionesytes.net/] ----------------------------------------------- Liberdade e conhecimento ao alcance de todos. Office Escritório - http://www.openoffice.org.br/ Navegador Firefox - http://www.mozilla.org.br/ Email Thunderbird - http://www.mozilla.org.br/ --------------------------------------------------------------- Linux user number 432030 of http://counter.li.org/ --------------------------------------------------------------- ICQ: 377035698 Jabber: ksomb...@jabber.org MSN: sombra_mes...@hotmail.com --------------------------------------------------------------- Curriculum: http://lattes.cnpq.br/0545256741852110 -- ------------------------------------------------------------------------------------ Dr. Edscott Wilson Garcia Applied Mathematics and Computing Mexican Petroleum Institute
_______________________________________________ gtkmm-list mailing list gtkmm-list@gnome.org https://mail.gnome.org/mailman/listinfo/gtkmm-list