Compile error
Added by Torsten Schulz over 6 years ago
Hi,
I did download the source of WT 4.0.0 from the main page and tried to compile it. But I got the following error:
[ 38%] Building CXX object src/CMakeFiles/wt.dir/Wt/WModelIndex.C.o
[ 38%] Building CXX object src/CMakeFiles/wt.dir/Wt/WNavigationBar.C.o
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:16:25: error: redeclaration ‘Wt::ItemDataRole::Display’ differs in ‘constexpr’
const int ItemDataRole::Display;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:144:24: error: from previous declaration ‘Wt::ItemDataRole::Display’
static constexpr int Display = 0; //!< Role for textual representation
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:16:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Display’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Display;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:17:25: error: redeclaration ‘Wt::ItemDataRole::Decoration’ differs in ‘constexpr’
const int ItemDataRole::Decoration;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:145:24: error: from previous declaration ‘Wt::ItemDataRole::Decoration’
static constexpr int Decoration = 1; //!< Role for the url of an icon
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:17:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Decoration’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Decoration;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:18:25: error: redeclaration ‘Wt::ItemDataRole::Edit’ differs in ‘constexpr’
const int ItemDataRole::Edit;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:146:24: error: from previous declaration ‘Wt::ItemDataRole::Edit’
static constexpr int Edit = 2; //!< Role for the edited value
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:18:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Edit’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Edit;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:19:25: error: redeclaration ‘Wt::ItemDataRole::StyleClass’ differs in ‘constexpr’
const int ItemDataRole::StyleClass;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:147:24: error: from previous declaration ‘Wt::ItemDataRole::StyleClass’
static constexpr int StyleClass = 3; //!< Role for the style class
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:19:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::StyleClass’ outside of class is not definition [-fpermissive]
const int ItemDataRole::StyleClass;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:20:25: error: redeclaration ‘Wt::ItemDataRole::Checked’ differs in ‘constexpr’
const int ItemDataRole::Checked;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:155:24: error: from previous declaration ‘Wt::ItemDataRole::Checked’
static constexpr int Checked = 4;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:20:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Checked’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Checked;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:21:25: error: redeclaration ‘Wt::ItemDataRole::ToolTip’ differs in ‘constexpr’
const int ItemDataRole::ToolTip;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:156:24: error: from previous declaration ‘Wt::ItemDataRole::ToolTip’
static constexpr int ToolTip = 5; //!< Role for a (plain) tooltip
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:21:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::ToolTip’ outside of class is not definition [-fpermissive]
const int ItemDataRole::ToolTip;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:22:25: error: redeclaration ‘Wt::ItemDataRole::Link’ differs in ‘constexpr’
const int ItemDataRole::Link;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:157:24: error: from previous declaration ‘Wt::ItemDataRole::Link’
static constexpr int Link = 6; //!< Role for a link
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:22:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Link’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Link;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:23:25: error: redeclaration ‘Wt::ItemDataRole::MimeType’ differs in ‘constexpr’
const int ItemDataRole::MimeType;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:158:24: error: from previous declaration ‘Wt::ItemDataRole::MimeType’
static constexpr int MimeType = 7; //!< Role for mime type information
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:23:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::MimeType’ outside of class is not definition [-fpermissive]
const int ItemDataRole::MimeType;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:24:25: error: redeclaration ‘Wt::ItemDataRole::Level’ differs in ‘constexpr’
const int ItemDataRole::Level;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:159:24: error: from previous declaration ‘Wt::ItemDataRole::Level’
static constexpr int Level = 8; //!< Level in aggregation, for header data.
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:24:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Level’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Level;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:25:25: error: redeclaration ‘Wt::ItemDataRole::MarkerPenColor’ differs in ‘constexpr’
const int ItemDataRole::MarkerPenColor;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:161:24: error: from previous declaration ‘Wt::ItemDataRole::MarkerPenColor’
static constexpr int MarkerPenColor = 16; //!< Marker pen color (for Chart::WCartesianChart)
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:25:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::MarkerPenColor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::MarkerPenColor;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:26:25: error: redeclaration ‘Wt::ItemDataRole::MarkerBrushColor’ differs in ‘constexpr’
const int ItemDataRole::MarkerBrushColor;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:162:24: error: from previous declaration ‘Wt::ItemDataRole::MarkerBrushColor’
static constexpr int MarkerBrushColor = 17; //!< Marker brush color (for Chart::WCartesianChart)
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:26:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::MarkerBrushColor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::MarkerBrushColor;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:27:25: error: redeclaration ‘Wt::ItemDataRole::MarkerScaleFactor’ differs in ‘constexpr’
const int ItemDataRole::MarkerScaleFactor;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:163:24: error: from previous declaration ‘Wt::ItemDataRole::MarkerScaleFactor’
static constexpr int MarkerScaleFactor = 20; //!< Marker size (for Chart::WCartesianChart)
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:27:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::MarkerScaleFactor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::MarkerScaleFactor;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:28:25: error: redeclaration ‘Wt::ItemDataRole::BarPenColor’ differs in ‘constexpr’
const int ItemDataRole::BarPenColor;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:164:24: error: from previous declaration ‘Wt::ItemDataRole::BarPenColor’
static constexpr int BarPenColor = 18; //!< Bar pen color (for Chart::WCartesianChart)
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:28:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::BarPenColor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::BarPenColor;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:29:25: error: redeclaration ‘Wt::ItemDataRole::BarBrushColor’ differs in ‘constexpr’
const int ItemDataRole::BarBrushColor;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:165:24: error: from previous declaration ‘Wt::ItemDataRole::BarBrushColor’
static constexpr int BarBrushColor = 19; //!< Bar brush color (for Chart::WCartesianChart)
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:29:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::BarBrushColor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::BarBrushColor;
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:30:25: error: redeclaration ‘Wt::ItemDataRole::User’ differs in ‘constexpr’
const int ItemDataRole::User;
^
In file included from /home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:10:0:
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.h:167:24: error: from previous declaration ‘Wt::ItemDataRole::User’
static constexpr int User = 32; //!< First role reserved for user purposes
^
/home/torsten/Downloads/wt-4.0.0/src/Wt/WModelIndex.C:30:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::User’ outside of class is not definition [-fpermissive]
const int ItemDataRole::User;
^
src/CMakeFiles/wt.dir/build.make:2938: recipe for target 'src/CMakeFiles/wt.dir/Wt/WModelIndex.C.o' failed
make[2]: *** [src/CMakeFiles/wt.dir/Wt/WModelIndex.C.o] Error 1
make[2]: *** Warte auf noch nicht beendete Prozesse...
CMakeFiles/Makefile2:170: recipe for target 'src/CMakeFiles/wt.dir/all' failed
make[1]: *** [src/CMakeFiles/wt.dir/all] Error 2
Makefile:127: recipe for target 'all' failed
make: *** [all] Error 2
I'm useing OpenSuse LEAP 42.3
Greetings
Torsten
Replies (8)
RE: Compile error - Added by Torsten Schulz over 6 years ago
Note: When I comment out this constexpr part in the WModelIndex.C, the file compiles
RE: Compile error - Added by Chao-Kai Yang over 6 years ago
I use ubuntu 14.4 , gcc version 4.8.4 .
I save same problem with you.
Wt requirements:
Compiler: Any compiler with sufficient support for C++11, like GCC 4.9 or higher, or Clang 3.3 or higher.
1. check gcc version : g -v
- install g 4.9
RE: Compile error - Added by Torsten Schulz over 6 years ago
Thanks for this answer, Chao-Kai Yang.
It was helpful. It wasn't so easy to change my compiler, because the standard is 4.8 and I won't change the standard for my distribution.
But I changed it for the creation and then it was working.
For the guys of redmine: It would be nice when you'd add a compiler setting into the configuration settings (ccmake)
Thanks
RE: Compile error - Added by Roel Standaert over 6 years ago
CMake allows you to change the C compiler by default. ccmake
reveals those options if you press the t
key (the CMAKE_CXX_COMPILER
and CMAKE_C_COMPILER
options).
Regards,
Roel
RE: Compile error - Added by Sebastian Fett almost 5 years ago
Getting the same errors with gcc 9.1.0
RE: Compile error - Added by lm at almost 5 years ago
Would you post a new post with the output you're getting along with the distribution, etc.?
RE: Compile error - Added by Sebastian Fett almost 5 years ago
/p/tv/local/redhat/wt-4.0.5/src/Wt/Dbo/backend/MSSQLServer.C:21:19: fatal error: codecvt: No such file or directory
#include <codecvt>
^
compilation terminated.
[ 28%] Building CXX object src/CMakeFiles/wt.dir/Wt/WLocalizedStrings.C.o
[ 28%] Linking CXX shared library libwtdbomysql.so
[ 30%] Building CXX object src/Wt/Dbo/backend/CMakeFiles/wtdbosqlite3.dir/Sqlite3.C.o
make[2]: *** [src/Wt/Dbo/backend/CMakeFiles/wtdbomssqlserver.dir/MSSQLServer.C.o] Error 1
make[1]: *** [src/Wt/Dbo/backend/CMakeFiles/wtdbomssqlserver.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 30%] Building CXX object src/CMakeFiles/wt.dir/Wt/WLogger.C.o
[ 30%] Building C object src/Wt/Dbo/backend/CMakeFiles/wtdbosqlite3.dir/amalgamation/sqlite3.c.o
[ 30%] Building CXX object src/CMakeFiles/wt.dir/Wt/WMatrix4x4.C.o
[ 30%] Building CXX object src/CMakeFiles/wt.dir/Wt/WMeasurePaintDevice.C.o
[ 30%] Built target wtdbomysql
[ 30%] Building CXX object src/CMakeFiles/wt.dir/Wt/WMediaPlayer.C.o
[ 31%] Building CXX object src/CMakeFiles/wt.dir/Wt/WMemoryResource.C.o
[ 31%] Building CXX object src/CMakeFiles/wt.dir/Wt/WMenu.C.o
[ 31%] Building CXX object src/CMakeFiles/wt.dir/Wt/WMenuItem.C.o
[ 31%] Building CXX object src/CMakeFiles/wt.dir/Wt/WMessageBox.C.o
[ 31%] Building CXX object src/CMakeFiles/wt.dir/Wt/WMessageResourceBundle.C.o
[ 31%] Building CXX object src/CMakeFiles/wt.dir/Wt/WMessageResources.C.o
[ 31%] Building CXX object src/CMakeFiles/wt.dir/Wt/WModelIndex.C.o
[ 31%] Building CXX object src/CMakeFiles/wt.dir/Wt/WNavigationBar.C.o
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:16:25: error: redeclaration ‘Wt::ItemDataRole::Display’ differs in ‘constexpr’
const int ItemDataRole::Display;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:149:30: error: from previous declaration ‘Wt::ItemDataRole::Display’
static constexpr const int Display = 0; //!< Role for textual representation
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:16:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Display’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Display;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:17:25: error: redeclaration ‘Wt::ItemDataRole::Decoration’ differs in ‘constexpr’
const int ItemDataRole::Decoration;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:150:30: error: from previous declaration ‘Wt::ItemDataRole::Decoration’
static constexpr const int Decoration = 1; //!< Role for the url of an icon
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:17:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Decoration’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Decoration;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:18:25: error: redeclaration ‘Wt::ItemDataRole::Edit’ differs in ‘constexpr’
const int ItemDataRole::Edit;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:151:30: error: from previous declaration ‘Wt::ItemDataRole::Edit’
static constexpr const int Edit = 2; //!< Role for the edited value
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:18:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Edit’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Edit;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:19:25: error: redeclaration ‘Wt::ItemDataRole::StyleClass’ differs in ‘constexpr’
const int ItemDataRole::StyleClass;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:152:30: error: from previous declaration ‘Wt::ItemDataRole::StyleClass’
static constexpr const int StyleClass = 3; //!< Role for the style class
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:19:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::StyleClass’ outside of class is not definition [-fpermissive]
const int ItemDataRole::StyleClass;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:20:25: error: redeclaration ‘Wt::ItemDataRole::Checked’ differs in ‘constexpr’
const int ItemDataRole::Checked;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:160:30: error: from previous declaration ‘Wt::ItemDataRole::Checked’
static constexpr const int Checked = 4;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:20:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Checked’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Checked;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:21:25: error: redeclaration ‘Wt::ItemDataRole::ToolTip’ differs in ‘constexpr’
const int ItemDataRole::ToolTip;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:161:30: error: from previous declaration ‘Wt::ItemDataRole::ToolTip’
static constexpr const int ToolTip = 5; //!< Role for a (plain) tooltip
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:21:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::ToolTip’ outside of class is not definition [-fpermissive]
const int ItemDataRole::ToolTip;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:22:25: error: redeclaration ‘Wt::ItemDataRole::Link’ differs in ‘constexpr’
const int ItemDataRole::Link;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:162:30: error: from previous declaration ‘Wt::ItemDataRole::Link’
static constexpr const int Link = 6; //!< Role for a link
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:22:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Link’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Link;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:23:25: error: redeclaration ‘Wt::ItemDataRole::MimeType’ differs in ‘constexpr’
const int ItemDataRole::MimeType;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:163:30: error: from previous declaration ‘Wt::ItemDataRole::MimeType’
static constexpr const int MimeType = 7; //!< Role for mime type information
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:23:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::MimeType’ outside of class is not definition [-fpermissive]
const int ItemDataRole::MimeType;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:24:25: error: redeclaration ‘Wt::ItemDataRole::Level’ differs in ‘constexpr’
const int ItemDataRole::Level;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:164:30: error: from previous declaration ‘Wt::ItemDataRole::Level’
static constexpr const int Level = 8; //!< Level in aggregation, for header data.
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:24:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::Level’ outside of class is not definition [-fpermissive]
const int ItemDataRole::Level;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:25:25: error: redeclaration ‘Wt::ItemDataRole::MarkerPenColor’ differs in ‘constexpr’
const int ItemDataRole::MarkerPenColor;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:166:30: error: from previous declaration ‘Wt::ItemDataRole::MarkerPenColor’
static constexpr const int MarkerPenColor = 16; //!< Marker pen color (for Chart::WCartesianChart)
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:25:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::MarkerPenColor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::MarkerPenColor;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:26:25: error: redeclaration ‘Wt::ItemDataRole::MarkerBrushColor’ differs in ‘constexpr’
const int ItemDataRole::MarkerBrushColor;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:167:30: error: from previous declaration ‘Wt::ItemDataRole::MarkerBrushColor’
static constexpr const int MarkerBrushColor = 17; //!< Marker brush color (for Chart::WCartesianChart)
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:26:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::MarkerBrushColor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::MarkerBrushColor;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:27:25: error: redeclaration ‘Wt::ItemDataRole::MarkerScaleFactor’ differs in ‘constexpr’
const int ItemDataRole::MarkerScaleFactor;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:168:30: error: from previous declaration ‘Wt::ItemDataRole::MarkerScaleFactor’
static constexpr const int MarkerScaleFactor = 20; //!< Marker size (for Chart::WCartesianChart)
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:27:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::MarkerScaleFactor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::MarkerScaleFactor;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:28:25: error: redeclaration ‘Wt::ItemDataRole::BarPenColor’ differs in ‘constexpr’
const int ItemDataRole::BarPenColor;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:169:30: error: from previous declaration ‘Wt::ItemDataRole::BarPenColor’
static constexpr const int BarPenColor = 18; //!< Bar pen color (for Chart::WCartesianChart)
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:28:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::BarPenColor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::BarPenColor;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:29:25: error: redeclaration ‘Wt::ItemDataRole::BarBrushColor’ differs in ‘constexpr’
const int ItemDataRole::BarBrushColor;
^
[ 33%] Building CXX object src/CMakeFiles/wt.dir/Wt/WObject.C.o
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:170:30: error: from previous declaration ‘Wt::ItemDataRole::BarBrushColor’
static constexpr const int BarBrushColor = 19; //!< Bar brush color (for Chart::WCartesianChart)
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:29:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::BarBrushColor’ outside of class is not definition [-fpermissive]
const int ItemDataRole::BarBrushColor;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:30:25: error: redeclaration ‘Wt::ItemDataRole::User’ differs in ‘constexpr’
const int ItemDataRole::User;
^
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:10:0:
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.h:172:30: error: from previous declaration ‘Wt::ItemDataRole::User’
static constexpr const int User = 32; //!< First role reserved for user purposes
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/WModelIndex.C:30:25: error: declaration of ‘constexpr const int Wt::ItemDataRole::User’ outside of class is not definition [-fpermissive]
const int ItemDataRole::User;
^
make[2]: *** [src/CMakeFiles/wt.dir/Wt/WModelIndex.C.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /p/tv/local/redhat/wt-4.0.5/src/Wt/Date/date.h:10:0,
from /p/tv/local/redhat/wt-4.0.5/src/Wt/Dbo/backend/Postgres.C:32:
/p/tv/local/redhat/wt-4.0.5/src/Wt/Date/include/date/date.h: In instantiation of ‘std::basic_istream<_CharT, _Traits>& date::from_stream(std::basic_istream<_CharT, _Traits>&, const CharT*, date::sys_time<Duration>&, std::basic_string<CharT, Traits, Alloc>*, std::chrono::minutes*) [with Duration = std::chrono::duration<long int, std::ratio<1l, 1000000000l> >; CharT = char; Traits = std::char_traits<char>; Alloc = std::allocator<char>; date::sys_time<Duration> = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1l, 1000000000l> > >; std::chrono::minutes = std::chrono::duration<int, std::ratio<60l> >]’:
/p/tv/local/redhat/wt-4.0.5/src/Wt/Date/include/date/date.h:7245:74: required from ‘std::basic_istream<_CharT, _Traits>& date::operator>>(std::basic_istream<_CharT, _Traits>&, const date::parse_manip<Parsable, CharT, Traits, Alloc>&) [with Parsable = std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long int, std::ratio<1l, 1000000000l> > >; CharT = char; Traits = std::char_traits<char>; Alloc = std::allocator<char>]’
/p/tv/local/redhat/wt-4.0.5/src/Wt/Dbo/backend/Postgres.C:566:37: required from here
/p/tv/local/redhat/wt-4.0.5/src/Wt/Date/include/date/date.h:4323:5: error: converting to ‘date::weekday’ from initializer list would use explicit constructor ‘constexpr date::weekday::weekday(unsigned int)’
fields() = default;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/Date/include/date/date.h:7174:20: note: synthesized method ‘date::fields<Duration>::fields() [with Duration = std::chrono::duration<long int, std::ratio<1l, 1000000000l> >]’ first required here
fields<CT> fds{};
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/Date/include/date/date.h: In instantiation of ‘std::basic_istream<_CharT, _Traits>& date::from_stream(std::basic_istream<_CharT, _Traits>&, const CharT*, std::chrono::duration<_Rep1, _Period1>&, std::basic_string<CharT, Traits, Alloc>*, std::chrono::minutes*) [with Rep = int; Period = std::ratio<1l, 1000l>; CharT = char; Traits = std::char_traits<char>; Alloc = std::allocator<char>; std::chrono::minutes = std::chrono::duration<int, std::ratio<60l> >]’:
/p/tv/local/redhat/wt-4.0.5/src/Wt/Date/include/date/date.h:7245:74: required from ‘std::basic_istream<_CharT, _Traits>& date::operator>>(std::basic_istream<_CharT, _Traits>&, const date::parse_manip<Parsable, CharT, Traits, Alloc>&) [with Parsable = std::chrono::duration<int, std::ratio<1l, 1000l> >; CharT = char; Traits = std::char_traits<char>; Alloc = std::allocator<char>]’
/p/tv/local/redhat/wt-4.0.5/src/Wt/Dbo/backend/Postgres.C:601:35: required from here
/p/tv/local/redhat/wt-4.0.5/src/Wt/Date/include/date/date.h:4323:5: error: converting to ‘date::weekday’ from initializer list would use explicit constructor ‘constexpr date::weekday::weekday(unsigned int)’
fields() = default;
^
/p/tv/local/redhat/wt-4.0.5/src/Wt/Date/include/date/date.h:7212:20: note: synthesized method ‘date::fields<Duration>::fields() [with Duration = std::chrono::duration<long int, std::ratio<1l, 1000l> >]’ first required here
fields<CT> fds{};
^
make[2]: *** [src/Wt/Dbo/backend/CMakeFiles/wtdbopostgres.dir/Postgres.C.o] Error 1
make[1]: *** [src/Wt/Dbo/backend/CMakeFiles/wtdbopostgres.dir/all] Error 2
make[1]: *** [src/CMakeFiles/wt.dir/all] Error 2
[ 33%] Linking CXX shared library libwtdbosqlite3.so
[ 33%] Built target wtdbosqlite3
make: *** [all] Error 2
RedHat 7, tried multiple GCC that output is with 5.4.0, getting the same with 9.0.1
And I am confused why codecvt isnt found since it should be part of std by now.
RE: Compile error - Added by Sebastian Fett almost 5 years ago
Wish I could edit the formatting, sorry about that