Qdatetime.h Error
Contents |
QDateTime class with Visual C++ 11.0Agile Board ExportXMLWordPrintable Details Type: Bug Status: Closed Priority: Not Evaluated Resolution: not enough actual parameters for macro Duplicate Affects Version/s: 5.0.2 Fix Version/s: None Component/s: Core: Date/Time
Error C2589: '(' : Illegal Token On Right Side Of '::'
Labels: None Environment: 1. Visual Studio Ultimate 2012 Update 2. 2. Qt 5.0.2 built
Not Enough Actual Parameters For Macro 'min'
from sources as shared library. 3. Qt Add-in 1.2.1 Description Failed to build application that uses QDateTime class with Visual C++ 11.0 due to absence of macro NOMINMAX (Windows specific): 1>d:\users\marat\documents\work\cpp\qt_5_0_2_msvc2012_shared\qtbase\include\qtcore\../../src/corelib/tools/qdatetime.h(123): warning C4003: not enough actual parameters for macro 'min' 1>d:\users\marat\documents\work\cpp\qt_5_0_2_msvc2012_shared\qtbase\include\qtcore\../../src/corelib/tools/qdatetime.h(123): error C2589: '(' : illegal token on right side of '::' 1>d:\users\marat\documents\work\cpp\qt_5_0_2_msvc2012_shared\qtbase\include\qtcore\../../src/corelib/tools/qdatetime.h(123): error C2059: syntax error : '::' If Qt needs NOMINMAX to be defined for building itself - that's ok. But I think that Qt shouldn't require this macro definition from users of Qt. Solution is very simple - make public headers of Qt independent of NOMINMAX (see qdatetime.h.patch). OptionsSort By NameSort By DateAscendingDescendingAttachments qdatetime.h.patch 31/May/13 12:21 AM 0.5 kB Marat Abrarov Issue Links is replaced by QTBUG-42767 QDateTime::nullJd usage of numeric_limits Closed OptionsIssue OnlyShow All ReviewsShow Open ReviewsShow All IssuesShow Open IssuesGerrit Reviews No reviews matched the request. Check your Options in the drop-down menu of this sections header. Activity All Comments Work Log History Activity Transitions Hide Permalink Thiago Macieira added a comment - 31/May/13 1:43 AM Won't fix. Define NOMINMAX or include windows.h after you included qdatetime.h. We're in 2013. Using macros for min and max went out of fashion about 15 years ago. Show Thiago Macieira added a comment - 31/May/13 1:43 AM Won't fix. Define NOMINMAX or include windows.h after you includ
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 6.2 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up why received the following error when using QT5? up vote 2 down vote favorite I am getting https://bugreports.qt.io/browse/QTBUG-31469 the following errors when I build a sample code using QT5, Visual Studio 2012 x64, static inline qint64 nullJd() { return std::numeric_limits
class If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have http://www.qtcentre.org/threads/54946-Getting-error-on-including-custom-widget-class to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. Welcome to Qt Centre. Qt Centre is a community site devoted to programming in C++ using the Qt framework. Over 90 percent of questions asked here gets answered. If not enough you are looking for information about Qt related issue — register and post your question. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, not enough actual upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. + Reply to Thread Results 1 to 3 of 3 Thread: Getting error on including custom widget class Thread Tools Show Printable Version Subscribe to this Thread… Search Thread Advanced Search Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode 12th June 2013,16:54 #1 rawfool View Profile View Forum Posts View Blog Entries View Articles Intermediate user Join Date Sep 2011 Location Bangalore Posts 229 Thanks 85 Thanked 16 Times in 16 Posts Qt products Platforms Getting error on including custom widget class On including a custom class widget, I'm getting the following errors. How do I fix this ? Qt Code: Switch view C:\Qt\Qt5.0.2\5.0.2\msvc2010\include\QtCore\qdatetime.h:123: error: C2589: '(' : illegal token on right side of '::'C:\Qt\Qt5.0.2\5.0.2\msvc2010\include\QtCore\qdatetime.h:123: error: C2059: syntax error : '::' C:\Qt\Qt5.0.2\5.0.2\msvc2010\include\QtCore\qdatetime.h:123: error: C2589: '(' : illegal token on right side of '::' C:\Qt\Qt5.0.2\5.0.2\msvc2010\include\QtCore\qdateti