QDeadLineTimer - error C2039: max is no member of std::numeric_limits
Solved
Language Bindings
-
Hi,
I try to compile my code, but I get the following errors in Visual Studio 2015:
1> ### Compiling Common Headers... 1>c:\qt\5.8\msvc2015\include\qtcore\qdeadlinetimer.h(61): error C2039: "max": Is no member of "std::numeric_limits<__int64>" 1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(960): note: view declaration of "std::numeric_limits<__int64>" 1>c:\qt\5.8\msvc2015\include\qtcore\qdeadlinetimer.h(61): error C3861: "max": Identifier not found. 1>c:\qt\5.8\msvc2015\include\qtcore\qdeadlinetimer.h(69): error C2039: "max": Is no member of "std::numeric_limits<__int64>" 1> c:\program files (x86)\microsoft visual studio 14.0\vc\include\limits(960): note: view declaration of "std::numeric_limits<__int64>" 1>c:\qt\5.8\msvc2015\include\qtcore\qdeadlinetimer.h(69): error C2065: "max": Identifier not declared
As you may see in the path, I use Qt 5.8 and translated the error messages to english. Do you have any idea, how I can compile my code?
Greetings
betaros -
Hi and welcome to devnet,
Can you share your .pro file ?
-
Hi,
I didn't had a .pro file, but I generated one with Visual Studio. I cannot show you the whole file, but I hope my edited version might also help. I just removed the filenames from my project.
# ---------------------------------------------------- # This file is generated by the Qt Visual Studio Tools. # ------------------------------------------------------ TEMPLATE = app TARGET = PROJECT DESTDIR = ../../Debug CONFIG += debug console DEFINES += PROJECT_DEF INCLUDEPATH += ./../../PROJECT \ ./GeneratedFiles \ $(NOINHERIT) LIBS += -L"." \ -lShlwapi \ -lAdvapi32 \ -lWs2_32 PRECOMPILED_HEADER = "./utils/Includes.h" DEPENDPATH += . MOC_DIR += ./GeneratedFiles OBJECTS_DIR += debug UI_DIR += . RCC_DIR += ./%(RootDir)%(Directory) #Edited HEADERS += .. #Edited SOURCES += .. #Edited FORMS += .. RESOURCES += ../Resources/Resources.qrc
Greetings
betaros -
Sorry, I almost never think of the use of the Visual Studio integration. Try adding
/DNOMINMAX
to your project defines. -
It was in your sources ?
-
Tricky one !
Thanks for sharing :)