Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.soft-sys.wxwindows > #35

Re: wxwidgets-linux: wxString

Newsgroups comp.soft-sys.wxwindows
From Vadim Zeitlin <vadim@wxwidgets.org>
Subject Re: wxwidgets-linux: wxString
References <5274ea5e$0$2356$91cee783@newsreader04.highway.telekom.at>
Message-ID <slrnl7gf48.io5.vadim@sunset.tt-solutions.com> (permalink)
Date 2013-11-05 00:32 +0000
Organization Guest of ProXad - France

Show all headers | View raw


On 2013-11-02, Peter Johann Brunner <pjbru@aon.at> wrote:
> I have wxGtk2 on 2 computers laptop and PC.
> both AMD 64Bit Athlon / Turion X2
> both Suse Linux 12.1 and wx-gtk2u-2.8.12-6.1.2-x86_64 from openSUSE
> gcc is also the same 4.6.2_20111026-1.1.4-x86_64 from openSUSE
>
> but compiling programs with wxString's there is a difference:
>
> on the PC I get warnings when passing wxString_var.c_str() as parameter
> to printf:
> 	printf("%s", wxString_var.c_str());

 It would have helped a lot to know what did the warning actually say, but
combining this piece of information ...

> equally likely I get errors by initializing wxStrings with cstrings:
> 	wxString wxString_var = "sometext";
> I must initialize with _T():
> 	wxString wxString_var = _T("sometext");

... with that one I'd say that you're using wxWidgets 2.8 in Unicode build
on your PC but ANSI build on your laptop.

> I think there must be some different configuration of wx on the 2 computers.
> But I can find nothing: e.g. wx-config's are identical.

 The wx/setup.h files used are different though.

> further difference:
>
> transferring the executable from laptop to PC and starting it, shows:
> cannot open shared obj file libwx_gtk2_richtext-2.8.so.0
>
> transferring in the other direction works OK.

 The only explanation for this is that you also built wxWidgets as static
library on the PC because otherwise it simply can't work without all the
shared libraries it depends on.

> can anybody give me a hint?

 Either reconfigure and rebuild with --enable-unicode or just use wxWidgets
3.0 (which is currently at RC2 step but will be released in less than a
week) where there is no difference between ANSI and Unicode build any more.

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
              http://www.tt-solutions.com/

Back to comp.soft-sys.wxwindows | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

wxwidgets-linux: wxString Peter Johann Brunner <pjbru@aon.at> - 2013-11-02 13:04 +0100
  Re: wxwidgets-linux: wxString Vadim Zeitlin <vadim@wxwidgets.org> - 2013-11-05 00:32 +0000
    Re: wxwidgets-linux: wxString Peter Johann Brunner <pjbru@aon.at> - 2013-11-05 16:14 +0100
      Re: wxwidgets-linux: wxString Vadim Zeitlin <vadim@wxwidgets.org> - 2013-11-12 21:59 +0000

csiph-web