Mega Search
23.2 Million


Sign Up

Make a donation  
wxwidgets-linux: wxString  
News Group: comp.soft-sys.wxwindows

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());
equally likely I get errors by initializing wxStrings with cstrings:
	wxString wxString_var = "sometext";
I must initialize with _T():
	wxString wxString_var = _T("sometext");

on the laptop neither of the 2 messages appear!
and the program executes normally

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.


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.

can anybody give me a hint?

thanks
Pit

Vote for best question.
Score: 0  # Vote:  0
Date Posted: 2-Nov-2013, at 1:04 PM EST
From: Peter Johann Brunner
 
Re: wxwidgets-linux: wxString  
News Group: comp.soft-sys.wxwindows
On 2013-11-05, Peter Johann Brunner  wrote:
> thank you for your prompt answer.
>
> as i wrote, the installations of wx... are identcal, not self built,
> from OPenSuse, same lib-names in /usr/lib64/:
> 	wx-2.8-stl/libwx_baseu-2.8.so
> 	...
> 	wx-2.8-stl/libwx_gtk2u_core-2.8.so
> 	...
> 	wx-2.8-wxcontainer/libwx_gtk2u_html-2.8.so
> 	etc.
> seems to be a unicode build?!

 Yes, both are built in Unicode mode.

> BUT:
> on both computers i tried a self built version with gtk1 !

 Well, don't. This version is not supported any more, so you are really
just looking for problems if you use it.

 But in any case, this doesn't explain the differences you described in
your initial post, GTK1 or not ANSI vs Unicode remains the same.

 Regards,
VZ

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

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 12-Nov-2013, at 9:59 PM EST
From: Vadim Zeitlin
 
Re: wxwidgets-linux: wxString  
News Group: comp.soft-sys.wxwindows
thank you for your prompt answer.

as i wrote, the installations of wx... are identcal, not self built,
from OPenSuse, same lib-names in /usr/lib64/:
	wx-2.8-stl/libwx_baseu-2.8.so
	...
	wx-2.8-stl/libwx_gtk2u_core-2.8.so
	...
	wx-2.8-wxcontainer/libwx_gtk2u_html-2.8.so
	etc.
seems to be a unicode build?!

i can't say exact things about the PC at the moment as i am not at home.

on the laptop there a unicode version since starting the program with
ddd shows up a message that UTF-8 is switched off since ddd has problems
with it.

BUT:
on both computers i tried a self built version with gtk1 !
i am rather sure to have these versions deinstalled before installing
the SUSE version, but perhaps there is some rest of this installations
on one or the other computer?

I tried this versions with gtk1.2, because i dislike the newer
implementation of wxBitmapButton, and thought this could evtl. help.
but it didn't.

please see the question
	wxBitmapButton with halo from cursor
in this group

thanks very much
	Pit



On 11/05/2013 01:32 AM, Vadim Zeitlin wrote:
> On 2013-11-02, Peter Johann Brunner  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
> 


Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 5-Nov-2013, at 4:14 PM EST
From: Peter Johann Brunner
 
Re: wxwidgets-linux: wxString  
News Group: comp.soft-sys.wxwindows
On 2013-11-02, Peter Johann Brunner  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/

Vote for best answer.
Score: 0  # Vote:  0
Date Posted: 5-Nov-2013, at 12:32 AM EST
From: Vadim Zeitlin