Troubleshooting
Problem
Attempts to test a long long variable using IBM Rational Test RealTime result in an unexpected value in the report.
Symptom
You test MyVarLong in the following way.
All source code and/or binaries attached to this document are referred to here as "the Program". IBM is not providing program services of any kind for the Program. IBM is providing the Program on an "AS IS" basis without warranty of any kind. IBM WILL NOT BE LIABLE FOR ANY ACTUAL, DIRECT, SPECIAL, INCIDENTAL, OR INDIRECT DAMAGES OR FOR ANY ECONOMIC CONSEQUENTIAL DAMAGES (INCLUDING LOST PROFITS OR SAVINGS), EVEN IF IBM, OR ITS RESELLER, HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. |
---|
|
EXPECTED
OBTAINED
The test truncated the obtained value to a 32-bits value.
Cause
Minimalist GNU for Windows (MinGW) uses the MSVCRT library for the printf format that Test RealTime uses.
Resolving The Problem
You need to customize the MinGW Target Deployment Port to use the MSVCRT library.
To do so, use the Target Deployment Port Editor in Parser Settings > Header adaptation for C.
- 1. Verify if you have the following pragma in
Parser Settings > Header adaptation for C.
#pragma attol sizeof(long) = 64
- Add the following code In Library Settings > Include files or code visible only to the Target Deployment Port.
#define _MSC_VER 1400
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21612988