Post by Paul S. PersonOn Thu, 2 Aug 2018 16:29:18 -0500, Lynn McGuire
Post by Lynn McGuireI am trying to compile some of my Visual Studio code in OW 1.9. My COM
code references the function _bstr_t. I cannot seem to find this
function in OW.
https://msdn.microsoft.com/en-us/library/zthfhkd6.aspx
I have /no/ relevent experience with "COM, Automation, and Interop
functions", but _bstr_t appears to be a /class/, not a function.
Header: comutil.h
Lib: comsuppw.lib or comsuppwd.lib
Yes, _bstr_t is in a class but there is code in a library also.
I munged up Microsoft's comutil.h and got it to compile with much
effort. But then I got a bunch of com_* undefines in the link. The
UTF8 undefines are ours.
C:\dii_15>linkdiid
Could Not Find C:\dii_15\designii.dll
Open Watcom Linker Version 1.9
Portions Copyright (c) 1985-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
loading object files
searching libraries
Error! E2028: int near UTF8toWide( char const near *,
std::basic_string<wchar_t near,std::char_traits<wchar_t near >
near,std::allocator<wchar_t near > near > near & ) is an undefined reference
Error! E2028: int near fopen_s_UTF8( __iobuf near * near *, char const
near *, char const near *, int ) is an undefined reference
Error! E2028: void near _com_issue_error( long ) is an undefined reference
Error! E2028: char near * near _com_util::ConvertBSTRToString( wchar_t
near * ) is an undefined reference
Error! E2028: wchar_t near * near _com_util::ConvertStringToBSTR( char
const near * ) is an undefined reference
Error! E2028: std::basic_string<char near,std::char_traits<char near >
near,std::allocator<char near > near > near SetUnitsCase(
std::basic_string<char near,std::char_traits<char near >
near,std::allocator<char near > near > ) is an undefined reference
creating map file
creating a Windows NT dynamic link library
file fm2nbook\fm2n_old.obj(C:\dii_15\fm2nbook\fm2n_old.cpp): undefined
symbol int near UTF8toWide( char const near *, std::basic_string<wchar_t
near,std::char_traits<wchar_t near > near,std::allocator<wchar_t near >
near > near & )
file fm2nbook\fm2n_old.obj(C:\dii_15\fm2nbook\fm2n_old.cpp): undefined
symbol int near fopen_s_UTF8( __iobuf near * near *, char const near *,
char const near *, int )
file fm2nbook\fm2n_old.obj(C:\dii_15\fm2nbook\fm2n_old.cpp): undefined
symbol void near _com_issue_error( long )
file fm2nbook\fm2n_old.obj(C:\dii_15\fm2nbook\fm2n_old.cpp): undefined
symbol char near * near _com_util::ConvertBSTRToString( wchar_t near * )
file fm2nbook\fm2n_old.obj(C:\dii_15\fm2nbook\fm2n_old.cpp): undefined
symbol wchar_t near * near _com_util::ConvertStringToBSTR( char const
near * )
file fm2nbook\fm2n_old.obj(C:\dii_15\fm2nbook\fm2n_old.cpp): undefined
symbol std::basic_string<char near,std::char_traits<char near >
near,std::allocator<char near > near > near SetUnitsCase(
std::basic_string<char near,std::char_traits<char near >
near,std::allocator<char near > near > )
Could Not Find C:\dii_15\designii.lib
Open Watcom Library Manager Version 1.9
Portions Copyright (c) 1984-2002 Sybase, Inc. All Rights Reserved.
Source code is available under the Sybase Open Watcom Public License.
See http://www.openwatcom.org/ for details.
Warning! Cannot open 'designii.lib' - library will be created
Error! Cannot find file 'designii.dll'
Thanks,
Lynn