Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in test\common\doctest.h when building tests with MSVC 2019 v16.11.5 #628

Closed
emmenlau opened this issue Oct 20, 2021 · 2 comments
Closed

Comments

@emmenlau
Copy link

Thanks for the awesome library. I get a minor build error on Windows with Visual Studio 2019 v16.11.5:

FAILED: test/CMakeFiles/test_malloc_atexit.dir/tbbmalloc/test_malloc_atexit.cpp.obj 
C:\PROGRA~2\MICROS~1\2019\COMMUN~1\VC\Tools\MSVC\1429~1.301\bin\Hostx64\x64\cl.exe   /TP -DTBB_USE_DEBUG -IC:\oneTBB\test\.. -IC:\oneTBB\test -IC:\oneTBB\src\tbbmalloc_proxy\..\..\include -IC:\oneTBB\src\tbbmalloc\..\..\include -IC:\oneTBB\test\..\include /MDd /Zi /arch:AVX2  /D_ITERATOR_DEBUG_LEVEL=0 /DWINVER=0x0603 /D_WIN32_WINNT=0x0603 /DDEBUG     /D_CRT_SECURE_NO_DEPRECATE /D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS     /wd4127 /wd4324    /DWIN32 /D_WINDOWS  /GR /EHsc /Zi /Ob0 /Od /RTC1 -MDd /W4 /bigobj /volatile:iso /FS -std:c++17 /showIncludes /Fotest\CMakeFiles\test_malloc_atexit.dir\tbbmalloc\test_malloc_atexit.cpp.obj /Fdtest\CMakeFiles\test_malloc_atexit.dir\ /FS -c C:\oneTBB\test\tbbmalloc\test_malloc_atexit.cpp
Microsoft (R) C/C++ Optimizing Compiler Version 19.29.30133 for x64
Copyright (C) Microsoft Corporation.  All rights reserved.
C:\oneTBB\test\common\doctest.h(5906): error C2589: '(': illegal token on right side of '::'
C:\oneTBB\test\common\doctest.h(5906): error C2061: syntax error: identifier 'p'
C:\oneTBB\test\common\doctest.h(5906): error C2059: syntax error: ')'
C:\oneTBB\test\common\doctest.h(5907): error C2589: '(': illegal token on right side of '::'
C:\oneTBB\test\common\doctest.h(5907): error C2061: syntax error: identifier 'p'
C:\oneTBB\test\common\doctest.h(5907): error C2059: syntax error: ')'
C:\oneTBB\test\common\doctest.h(5908): error C2589: '(': illegal token on right side of '::'
C:\oneTBB\test\common\doctest.h(5908): error C2061: syntax error: identifier 'p'
C:\oneTBB\test\common\doctest.h(5908): error C2059: syntax error: ')'
C:\oneTBB\test\common\doctest.h(5910): error C3536: 'totwidth': cannot be used before it is initialized
C:\oneTBB\test\common\doctest.h(5914): error C3536: 'passwidth': cannot be used before it is initialized
C:\oneTBB\test\common\doctest.h(5916): error C3536: 'failwidth': cannot be used before it is initialized

This error comes after I include windows.h in test/common/utils_report.h to work around issue #627. Therefore it is possible that the two issues are connected (fixing the one causes the other?).

@phprus
Copy link
Contributor

phprus commented Oct 20, 2021

PR #603 fixes this problem

@emmenlau
Copy link
Author

Thanks @phprus! I can confirm that this indeed fixes the problems #627 and #628 when building with Visual Studio 2019 v16.11.5 on Windows!

Please close this issue as fixed, or should we wait with closing until #603 is merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants