ACE_TAO icon indicating copy to clipboard operation
ACE_TAO copied to clipboard

TAO_IFRService does not build with Unicode Character set selected in MSVC 2019

Open dangreen12 opened this issue 3 years ago • 2 comments

Version

6.5.12

The version of ACE and/or TAO you are using

Host machine and operating system

Windows 10-2004 / Intel i9

Target machine and operating system (if different from host)

Compiler name and version (including patch level)

MSVC 2019 16.7.7

The $ACE_ROOT/ace/config.h file

#define ACE_HAS_STANDARD_CPP_LIBRARY 1
#define ACE_USES_STD_NAMESPACE_FOR_STDCPP_LIB 1
#ifdef _DEBUG
#define ACE_HAS_DUMP 1
#endif // _DEBUG
// turn off c runtime lib deprication warnings
#pragma warning (disable:4996)

#ifndef _CRT_SECURE_NO_WARNINGS
// turn off security warnings
#define _CRT_SECURE_NO_WARNINGS
#endif
#define TAO_HAS_ZIOP 1
#define ACE_USES_WCHAR 1
#define _FILE_OFFSET_BITS 64
#include "ace/config-win32.h"

If you use a link to a platform-specific file, simply state which one

The $ACE_ROOT/include/makeinclude/platform_macros.GNU file

if you use a link to a platform-specific file, simply state which one (unless this isn't used in this case, e.g., with Microsoft Visual C++)

Contents of $ACE_ROOT/bin/MakeProjectCreator/config/default.features

Used by MPC when you generate your own makefiles

AREA/CLASS/EXAMPLE AFFECTED:

What example failed? What module failed to compile? IFRService when Unicode character set is enabled

The problem effects:

Does it affect compilation, linking, or execution. Please indicate whether ACE/TAO, your application, or both are affected.

Synopsis

Unable to compile IFRService with unicode enabled for x64 and win32. All other components of TAO compile without errors.

Description

1>------ Build started: Project: IFRService, Configuration: Release Win32 ------
1>ComponentContainer_i.cpp
1>ComponentDef_i.cpp
1>ConstantDef_i.cpp
1>Contained_i.cpp
1>Container_i.cpp
1>EnumDef_i.cpp
1>EventPortDef_i.cpp
1>ExceptionDef_i.cpp
1>ExtAttributeDef_i.cpp
1>ExtValueDef_i.cpp
1>HomeDef_i.cpp
1>IFR_Service_Utils.cpp
1>IRObject_i.cpp
1>InterfaceAttrExtension_i.cpp
1>InterfaceDef_i.cpp
1>ModuleDef_i.cpp
1>D:\dev-vc19\3rdParty\ACE+TAO-6.5.12\TAO\orbsvcs\orbsvcs\IFRService\ConstantDef_i.cpp(61,40): error C2679: binary '=': no operator found which takes a right-hand operand of type 'const ACE_CHAR_T *' (or there is no acceptable conversion)
1>        with
1>        [
1>            ACE_CHAR_T=ACE_WSTRING_TYPE
1>        ]
1>D:\dev-vc19\3rdParty\ACE+TAO-6.5.12\TAO\tao\String_Manager_T.h(92,28): message : could be 'TAO::String_Manager_T<TAO::details::string_traits_base<char>::char_type> &TAO::String_Manager_T<TAO::details::string_traits_base<char>::char_type>::operator =(char *)' (compiling source file IFRService\ConstantDef_i.cpp)
1>D:\dev-vc19\3rdParty\ACE+TAO-6.5.12\TAO\tao\String_Manager_T.h(82,28): message : or       'TAO::String_Manager_T<TAO::details::string_traits_base<char>::char_type> &TAO::String_Manager_T<TAO::details::string_traits_base<char>::char_type>::operator =(const char *)' (compiling source file IFRService\ConstantDef_i.cpp)
1>D:\dev-vc19\3rdParty\ACE+TAO-6.5.12\TAO\tao\String_Manager_T.h(73,28): message : or       'TAO::String_Manager_T<TAO::details::string_traits_base<char>::char_type> &TAO::String_Manager_T<TAO::details::string_traits_base<char>::char_type>::operator =(const TAO::details::string_traits_base<char>::string_var &)' (compiling source file IFRService\ConstantDef_i.cpp)
1>D:\dev-vc19\3rdParty\ACE+TAO-6.5.12\TAO\tao\String_Manager_T.h(64,28): message : or       'TAO::String_Manager_T<TAO::details::string_traits_base<char>::char_type> &TAO::String_Manager_T<TAO::details::string_traits_base<char>::char_type>::operator =(const TAO::String_Manager_T<TAO::details::string_traits_base<char>::char_type> &)' (compiling source file IFRService\ConstantDef_i.cpp)
1>D:\dev-vc19\3rdParty\ACE+TAO-6.5.12\TAO\orbsvcs\orbsvcs\IFRService\ConstantDef_i.cpp(61,40): message : while trying to match the argument list '(TAO::String_Manager, const ACE_CHAR_T *)'
1>        with
1>        [
1>            ACE_CHAR_T=ACE_WSTRING_TYPE
1>        ]
1>D:\dev-vc19\3rdParty\ACE+TAO-6.5.12\TAO\orbsvcs\orbsvcs\IFRService\ConstantDef_i.cpp(139,25): error C2664: 'int ACE_Configuration::set_string_value(const ACE_Configuration_Section_Key &,const ACE_TCHAR *,const ACE_TString &)': cannot convert argument 2 from 'const char [10]' to 'const ACE_TCHAR *'
1>D:\dev-vc19\3rdParty\ACE+TAO-6.5.12\TAO\orbsvcs\orbsvcs\IFRService\ConstantDef_i.cpp(140,45): message : Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast

<snip>

count exceeds 100; stopping compilation
1>Done building project "IFRService_vs2019.vcxproj" -- FAILED.
2>------ Build started: Project: IFR_Service, Configuration: Release Win32 ------
2>LINK : fatal error LNK1181: cannot open input file 'TAO_IFRService.lib'
2>Done building project "IFR_Service_vs2019.vcxproj" -- FAILED.
========== Build: 0 succeeded, 2 failed, 31 up-to-date, 0 skipped ==========

dangreen12 avatar Nov 04 '20 18:11 dangreen12

This is a known issue, see http://bugzilla.dre.vanderbilt.edu/show_bug.cgi?id=3442.

The IFRService is disabled for wchar compilation, see https://github.com/DOCGroup/ACE_TAO/blob/754e5a7a4d7c445d52b5376323bf19a6a206dc23/TAO/orbsvcs/orbsvcs/IFRService.mpc#L3.

As you are now setting ACE_USES_WCHAR and using the normal generated project files this disabling doesn't work. When you require the IFRService with unicode enabled open a pull request with the necessary code and MPC file changes. One of the commercial support providers could assist with this, see https://www.dre.vanderbilt.edu/~schmidt/commercial-support.html for an overview including Remedy IT.

jwillemsen avatar Nov 05 '20 07:11 jwillemsen

Great to see that you are using ZIOP, that is a very interesting addition to CORBA!

jwillemsen avatar Nov 05 '20 07:11 jwillemsen