[tao-users] [ace-users] Compilation error using ACE_USES_WCHAR

Johnny Willemsen jwillemsen at remedy.nl
Thu May 21 12:10:20 CDT 2015


Hi,

> Thank you very much! The usage of macros ACE_TEXT_ALWAYS_CHAR, ACE_TEXT and ACE_TEXT_CHAR_TO_TCHAR solves the issues with IFRService.

The IFRService wasn't updated for wchar support so your changes are
welcome. At the moment you have updated all code, also remove the avoids
of uses_wchar in TAO/MPC/config/ifrservice.mpb, at that moment also
wchar builds will try to compile the IFRService
> 
> To share this through a pull request I still have to figure out how to setup a build from the git repository though.

Easiest is to use travis-ci for your fork, at the moment you enable
github/travis-ci integration you can very easily build your fork using
travis-ci.

Johnny

> 
> Thank you very much.
> 
> Best regards!
> Mello 
> 
> 
> -----Original Message-----
> From: tao-users [mailto:tao-users-bounces at list.isis.vanderbilt.edu] On Behalf Of Phil Mesnier
> Sent: quarta-feira, 20 de maio de 2015 18:31
> To: Cesar Mello
> Cc: tao-users at list.isis.vanderbilt.edu
> Subject: Re: [tao-users] [ace-users] Compilation error using ACE_USES_WCHAR
> 
> Hi Cesar,
> 
> I'm shifting this to the TAO users list… (using my registered account this time)
> 
>> On May 20, 2015, at 4:02 PM, Cesar Mello <cmello at gmail.com> wrote:
>>
>> Hi,
>>
>> I can build most of ACE and TAO using ACE_USES_WCHAR under Windows (Visual Studio 2015 RC). Everything I currently need works, congratulations for the great work!
>>
> 
> On behalf of the ATCD development community, thanks!
> 
> 
>> But in IFRService/AliasDef_i.cpp the local variable ACE_TString "id" is wide (that's ok when reading from the ACE_Configuration::get_string_value because it also returns a wide string):
>>
>> ----
>> CORBA::TypeCode_ptr
>> TAO_AliasDef_i::type_i (void)
>> {
>>  ACE_TString id;
>>  this->repo_->config ()->get_string_value (this->section_key_,
>>                                            ACE_TEXT("id"),
>>                                            id);
>> ----
>>
>> But later this wide string is passed to CORBA::TypeFactory::create_alias_tc which expects an ANSI string (const char*):
>>
>> ---
>>
>>  return this->repo_->tc_factory ()->create_alias_tc (id.c_str (),
>>                                                      name.c_str (),
>>                                                      tc.in ());
>>
>> ---
>>
>> Should this string be converted from wide to ANSI before calling create_alias_tc?
>>
> 
> Thank you again for reporting this defect. There is a macro we use, ACE_TEXT_ALWAYS_CHAR(). In context the fix is:
>  return this->repo_->tc_factory ()->create_alias_tc (id.c_str (),
>                                                      name.c_str (),
>                                                      ACE_TEXT_ALWAYS_CHAR (tc.in ()));
> 
>> Maybe if you give me a hint I can fix it myself.
>>
> 
> There are several ACE_TEXT* macros used to handle char/wchar_t conversions. Note that these are not proper translators so use of character sets that extend beyond 0xFF (0x7F?) will yield interesting results. :-)
> 
> 
>> Thank you a lot for the attention.
>>
>> Best regards!
>> Mello
>>
> 
> -Phil
> 
> --
> Phil Mesnier
> Principal Software Engineer and Partner,   http://www.ociweb.com
> Object Computing, Inc.                     +01.314.579.0066 x225
> 
> 
> 
> 
> _______________________________________________
> tao-users mailing list
> tao-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/tao-users
> _______________________________________________
> tao-users mailing list
> tao-users at list.isis.vanderbilt.edu
> http://list.isis.vanderbilt.edu/cgi-bin/mailman/listinfo/tao-users
> 
> 



More information about the tao-users mailing list