yse / easy_profiler

Lightweight profiler library for c++
MIT License
2.14k stars 184 forks source link

Can't compile it under VS2019 32-bit #171

Closed ludekvodicka closed 4 years ago

ludekvodicka commented 4 years ago

Hi,

I'm trying to compile latest version under VS 2019 - 32 bit but I'm receiving this error:

redefinition of default argument: parameter 1

It's because these two lines are the same for 32-bit OS:

QString shortenCountString(size_t count, int precision = 1);
QString shortenCountString(uint32_t count, int precision = 1);

Should this library work also for 32-bit or should I tried it only under 64-bit?

Here is full error log:

[ 25%] Automatic MOC for target profiler_gui
[ 25%] Built target profiler_gui_autogen
[ 27%] Automatic RCC for resources.qrc
Scanning dependencies of target profiler_gui
[ 29%] Building CXX object profiler_gui/CMakeFiles/profiler_gui.dir/profiler_gui_autogen/mocs_compilation.cpp.obj
mocs_compilation.cpp
Q:\ExternalLibraries\librariesWindows\easy_profiler-2.1.0\profiler_gui\common_functions.h(203): error C2572: 'profiler_gui::shortenCountString': redefinition of default argument: parameter 1
Q:\ExternalLibraries\librariesWindows\easy_profiler-2.1.0\profiler_gui\common_functions.h(202): note: see declaration of 'profiler_gui::shortenCountString'
NMAKE : fatal error U1077: 'C:\PROGRA~2\MIB055~1\2019\PROFES~1\VC\Tools\MSVC\1423~1.281\bin\Hostx86\x86\cl.exe' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.23.28105\bin\HostX86\x86\nmake.exe"' : return code '0x2'
Stop.

Microsoft (R) Program Maintenance Utility Version 14.23.28107.0
Copyright (C) Microsoft Corporation.  All rights reserved.
ludekvodicka commented 4 years ago

When I commented one of these two lines (shortenCountString) the rest of the project is compiled successfully.

ludekvodicka commented 4 years ago

PR https://github.com/yse/easy_profiler/pull/173