Highlighted
Member.
146 views

Unable to get RunTestSet.cpp for QC versions 8 to 10 to compile

Hi,

I am using a program made by a HP engineer called RunTestSetscheduler. The version I am using appears to have been designed for quality centre versions 8.x, 9.x, and 10,

I have noticed the file used to run UFT test sets automatically vis the task scheduler 'RunTestSet.exe' is open source as the source code used to compile it can be found in inside the C:\RunTestSetScheduler.

What I am trying to do is modify the html in RunTestSet.cpp source file so that the format of the email it sends out once the test is complete is different. At the moment however I cannot get these source files to compile altogether with a C++ due to compilation errors.

The source code uses the header files "afx.h" and "afxdisp.h" which from upon research I did is only supported in Visual C++ 2005 or earlier. To resolve this problem I installed a copy of visual studio 2005 to compile it.

I am wanting to know if anyone is familiar with these files because even if I do not make any changes to this source code it will still fail to compile. At first I got the following error

RunTestSet.cpp
 WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
RunTestSet.cpp(6) : fatal error C1083: Cannot open include file: 'iostream.h': No such file or directory

to resolve this I had to rename the "iostream.h" include to "iostream" as it has been that way since c98. I then tried compiling again I got the error 'otaclient.tlh(193) : error C3121: cannot change GUID for class 'ICommand'

Full output for this error is shown below:

Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 14.00.50727.42 for 80x86
Copyright (C) Microsoft Corporation.  All rights reserved.
RunTestSet.cpp
 WINVER not defined. Defaulting to 0x0502 (Windows Server 2003)
c:\runtestsetscheduler\otaclient.tlh(193) : error C3121: cannot change GUID for class 'ICommand'
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\oledb.h(6361) : see declaration of 'ICommand'
c:\runtestsetscheduler\otaclient.tlh(6449) : error C2011: 'ICommand' : 'struct' type redefinition
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\oledb.h(6361) : see declaration of 'ICommand'
c:\runtestsetscheduler\otaclient.tlh(6495) : error C2504: 'ICommand' : base class undefined
c:\runtestsetscheduler\otaclient.tlh(32714) : error C2027: use of undefined type 'ICommand'
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\oledb.h(6361) : see declaration of 'ICommand'
c:\runtestsetscheduler\otaclient.tlh(32715) : error C2027: use of undefined type 'ICommand'
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\oledb.h(6361) : see declaration of 'ICommand'
c:\runtestsetscheduler\otaclient.tlh(32716) : error C2027: use of undefined type 'ICommand'
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\oledb.h(6361) : see declaration of 'ICommand'
c:\runtestsetscheduler\otaclient.tlh(32717) : error C2027: use of undefined type 'ICommand'
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\oledb.h(6361) : see declaration of 'ICommand'
c:\runtestsetscheduler\otaclient.tlh(32718) : error C2027: use of undefined type 'ICommand'
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\oledb.h(6361) : see declaration of 'ICommand'
c:\runtestsetscheduler\otaclient.tlh(32719) : error C2027: use of undefined type 'ICommand'
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\PlatformSDK\include\oledb.h(6361) : see declaration of 'ICommand'
RunTestSet.cpp(54) : error C2593: 'operator +=' is ambiguous
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1351): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const wchar_t *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1338): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const char *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        while trying to match the argument list '(CString, _bstr_t)'
RunTestSet.cpp(67) : error C2593: 'operator +=' is ambiguous
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1351): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const wchar_t *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1338): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const char *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        while trying to match the argument list '(CString, _bstr_t)'
RunTestSet.cpp(107) : error C2593: 'operator +=' is ambiguous
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1351): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const wchar_t *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1338): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const char *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        while trying to match the argument list '(CString, _bstr_t)'
RunTestSet.cpp(138) : error C2593: 'operator +=' is ambiguous
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1351): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const wchar_t *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1338): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const char *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        while trying to match the argument list '(CString, _bstr_t)'
RunTestSet.cpp(215) : error C2065: 'cout' : undeclared identifier
RunTestSet.cpp(215) : error C2065: 'endl' : undeclared identifier
RunTestSet.cpp(352) : error C2593: 'operator +=' is ambiguous
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1351): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const wchar_t *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1338): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const char *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        while trying to match the argument list '(CString, _bstr_t)'
RunTestSet.cpp(383) : error C2593: 'operator +=' is ambiguous
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1351): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const wchar_t *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1338): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const char *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        while trying to match the argument list '(CString, _bstr_t)'
RunTestSet.cpp(546) : error C2593: 'operator +=' is ambiguous
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1351): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const wchar_t *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1338): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const char *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        while trying to match the argument list '(CString, _bstr_t)'
RunTestSet.cpp(577) : error C2593: 'operator +=' is ambiguous
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1351): could be 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const wchar_t *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 8\VC\ATLMFC\INCLUDE\cstringt.h(1338): or 'ATL::CStringT<BaseType,StringTraits> &ATL::CStringT<BaseType,StringTraits>::operator +=(const char *)'
        with
        [
            BaseType=char,
            StringTraits=StrTraitMFC<char>
        ]
        while trying to match the argument list '(CString, _bstr_t)'
RunTestSet.cpp(631) : warning C4129: 'T' : unrecognized character escape sequence
RunTestSet.cpp(631) : warning C4129: 'T' : unrecognized character escape sequence


Is anyone able to help me with this?

 

 

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.