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

Visual Studio 2013 Support #46

Closed
dasloop opened this issue May 25, 2014 · 10 comments
Closed

Visual Studio 2013 Support #46

dasloop opened this issue May 25, 2014 · 10 comments

Comments

@dasloop
Copy link

dasloop commented May 25, 2014

I have tryed to compile Tufao 1.0 using VS 2013 and I run into some problems:

  • CMake looks for the CXX11 flag but, as far as I know, such flag doesn't exists in VS (and it is not required)
  • CMake adds the flag -Wextras that doesn't exists in VS 2013

After fixing both problems the compiler has problems with the definition of a template in this struct (priv/httpserverrequest.h line 99):

struct RawData
{
    template<int N>
    constexpr RawData(const char (&data)[N]) :
        data(data),
        size(N - 1)
    {}

    const char *data;
    int size;
};

Any plan to support VS 2013? I'm doing something wrong at configuration level?

My CMake command is:

cmake .. -DCMAKE_INSTALL_PREFIX=c:/Qt/Qt5.3.0/5.3/msvc2013_64_opengl/ -DCMAKE_BUILD_TYPE=Release -G "NMake Makefiles"

Thanks,

David

@vinipsmaker
Copy link
Owner

The CXX11 flag is not a problem. CMake will try an empty argument also.

About the -Wextras, I'll fix it.

About the failing code, I don't know why it failed. Can you paste the compiler output?

Have you used the CTP?

And thanks for the feedback.

@dasloop
Copy link
Author

dasloop commented May 26, 2014

Hi,

Thanks for your reply and the software, I'm using it in an app in Mac and Linux and it works perfectly. Unfortunately I have to provide a version for Windows.

My environment is:

  • Visual Studio 2013 Update 2
  • cmake 2.8.12.2
  • Tufao zip from github (May 25)
  • Qt 5.3.0 64bit OpenGL for Visual 2013

The errors due to cmake cxx11 are:

-- The C compiler identification is MSVC 18.0.30501.0
-- The CXX compiler identification is MSVC 18.0.30501.0
-- Check for working C compiler: c:/Program Files (x86)/Microsoft Visual
Studio 12.0/VC/bin/amd64/cl.exe
-- Check for working C compiler: c:/Program Files (x86)/Microsoft Visual
Studio 12.0/VC/bin/amd64/cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual
Studio 12.0/VC/bin/amd64/cl.exe
-- Check for working CXX compiler: c:/Program Files (x86)/Microsoft Visual
Studio 12.0/VC/bin/amd64/cl.exe -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Try C++11 flag = [-std=c++11]
-- Performing Test CXX11_FLAG_DETECTED
-- Performing Test CXX11_FLAG_DETECTED - Failed
-- Try C++11 flag = [-std=c++0x]
-- Performing Test CXX11_FLAG_DETECTED
-- Performing Test CXX11_FLAG_DETECTED - Failed
-- Try C++11 flag = [ ]
-- Performing Test CXX11_FLAG_DETECTED
-- Performing Test CXX11_FLAG_DETECTED - Failed
-- Try C++11 flag = [/Qstd=c++0x]
-- Performing Test CXX11_FLAG_DETECTED
-- Performing Test CXX11_FLAG_DETECTED - Failed
-- Try C++11 flag = [-stdlib=libc++]
-- Performing Test CXX11_FLAG_DETECTED
-- Performing Test CXX11_FLAG_DETECTED - Failed
CMake Error at c:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:108
(message):
  Could NOT find CXX11 (missing: CXX11_FLAGS)
Call Stack (most recent call first):
  c:/Program Files (x86)/CMake
2.8/share/cmake-2.8/Modules/FindPackageHandleStandardArgs.cmake:315
(_FPHSA_FAILURE_MESSAGE)
  cmake/modules/FindCXX11.cmake:63 (find_package_handle_standard_args)
  CMakeLists.txt:16 (find_package)

Editing CMakeList.txt to remove the Cxx11 requirement it generates the Makefiles. After that I have removed the /Wextras flag. And, then, the errors:

[  3%] Automoc for target tufao1
[  3%] Built target tufao1_automoc
[  6%] Building CXX object
src/CMakeFiles/tufao1.dir/httpserverrequest.cpp.obj
httpserverrequest.cpp
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\stdio.h(66)
: warning C4820: '_iobuf' : '4' bytes padding added after data member
'_iobuf::_cnt'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(119)
: warning C4820: '_wfinddata64i32_t' : '4' bytes padding added after data
member '_wfinddata64i32_t::att
rib'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(124)
: warning C4820: '_wfinddata64i32_t' : '4' bytes padding added after data
member '_wfinddata64i32_t::nam
e'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(128)
: warning C4820: '_wfinddata64_t' : '4' bytes padding added after data
member '_wfinddata64_t::attrib'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(508)
: warning C4820: '_stat32' : '2' bytes padding added after data member
'_stat32::st_gid'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(524)
: warning C4820: 'stat' : '2' bytes padding added after data member
'stat::st_gid'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(540)
: warning C4820: '_stat32i64' : '2' bytes padding added after data member
'_stat32i64::st_gid'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(541)
: warning C4820: '_stat32i64' : '4' bytes padding added after data member
'_stat32i64::st_rdev'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(545)
: warning C4820: '_stat32i64' : '4' bytes padding added after data member
'_stat32i64::st_ctime'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(554)
: warning C4820: '_stat64i32' : '2' bytes padding added after data member
'_stat64i32::st_gid'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(568)
: warning C4820: '_stat64' : '2' bytes padding added after data member
'_stat64::st_gid'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\wchar.h(569)
: warning C4820: '_stat64' : '4' bytes padding added after data member
'_stat64::st_rdev'
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\math.h(39) :
warning C4820: '_exception' : '4' bytes padding added after data member
'_exception::type'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qrefcount.h(58)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replaci
ng with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qrefcount.h(69)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replaci
ng with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qrefcount.h(78)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replaci
ng with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qlist.h(149)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replacing
with '0' for '#if/#elif'
c:\Qt\qt5.3.0\5.3\msvc2013_64_opengl\include\qtcore\qhash.h(129)
: warning C4820: 'QHashData::Node' : '4' bytes padding added after data
member 'QHashData::Node::h'
c:\Qt\qt5.3.0\5.3\msvc2013_64_opengl\include\qtcore\qhash.h(161)
: warning C4820: 'QHashData' : '4' bytes padding added after data member
'QHashData::shared_null'
c:\Qt\qt5.3.0\5.3\msvc2013_64_opengl\include\qtcore\qhash.h(333)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replacing
with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qarraydata.h(57)
: warning C4820: 'QArrayData' : '4' bytes padding added after data member
'QArrayData::capacityReser
ved'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qarraydata.h(83)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replac
ing with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qarraydata.h(104)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, repla
cing with '0' for '#if/#elif'fao-master\src\httpserverrequest.cpp(295) :
error C2065: 'MT' : undeclared identifier
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qbytearray.h(460)
: warning C4365: 'return' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qbytearray.h(511)
: warning C4820: 'QByteRef' : '4' bytes padding added after data member
'QByteRef::i'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qbytearray.h(516)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qbytearray.h(556)
: warning C4365: 'argument' : conversion from 'int' to 'size_t',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qbytearray.h(606)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qbytearray.h(608)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qbytearray.h(610)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(122)
: warning C4820: 'QLatin1String' : '4' bytes padding added after data
member 'QLatin1String::m_size'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(91)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(499)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(499)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(501)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(501)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(503)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(503)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(605)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(605)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(817)
: warning C4365: 'return' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(986)
: warning C4820: 'QCharRef' : '4' bytes padding added after data member
'QCharRef::i'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(921)
: warning C4365: 'argument' : conversion from 'uchar' to 'char',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1024)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1059)
: warning C4365: 'argument' : conversion from 'int' to 'size_t',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1061)
: warning C4365: 'argument' : conversion from 'int' to 'size_t',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1063)
: warning C4365: 'argument' : conversion from 'const int' to 'size_t',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1066)
: warning C4365: 'argument' : conversion from 'const int' to 'size_t',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1069)
: warning C4365: 'argument' : conversion from 'const int' to 'size_t',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1072)
: warning C4365: 'argument' : conversion from 'const int' to 'size_t',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1155)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1155)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1157)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1157)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1159)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1159)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1161)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1161)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1163)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1163)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1165)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1165)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1168)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1168)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1170)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1170)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1172)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1172)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1174)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1174)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1176)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1176)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1178)
: warning C4365: 'argument' : conversion from 'int' to 'uint',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1178)
: warning C4365: 'argument' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1224)
: warning C4365: 'argument' : conversion from 'int' to 'unsigned __int64',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1232)
: warning C4365: 'argument' : conversion from 'int' to 'unsigned __int64',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstring.h(1240)
: warning C4365: 'argument' : conversion from 'int' to 'unsigned __int64',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qmetatype.h(777)
: warning C4820: 'QtMetaTypePrivate::VariantData' : '4' bytes padding added
after data member 'QtMet
aTypePrivate::VariantData::metaTypeId'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qmetatype.h(782)
: warning C4820: 'QtMetaTypePrivate::VariantData' : '4' bytes padding added
after data member 'QtMet
aTypePrivate::VariantData::flags'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qmetatype.h(920)
: warning C4820: 'QtMetaTypePrivate::QSequentialIterableImpl' : '4' bytes
padding added after data m
ember 'QtMetaTypePrivate::QSequentialIterableImpl::_iteratorCapabilities'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qmetatype.h(1999)
: warning C4365: 'return' : conversion from 'uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qmetatype.h(2000)
: warning C4365: 'return' : conversion from 'const uint' to 'int',
signed/unsigned mismatch
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qobject_impl.h(115)
: warning C4820: 'QtPrivate::QSlotObjectBase' : '4' bytes padding added
after data member 'QtPriv
ate::QSlotObjectBase::m_ref'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qobject.h(571)
: warning C4820: 'QSignalBlocker' : '6' bytes padding added after data
member 'QSignalBlocker::m_inhib
ited'
c:\users\user\downloads\tufao-master\src\httpserverresponse.h(432) :
warning C4625: 'Tufao::HttpServerResponse' : copy constructor could not be
generated because a base class co
py constructor is inaccessible or deleted
c:\users\user\downloads\tufao-master\src\httpserverresponse.h(432) :
warning C4626: 'Tufao::HttpServerResponse' : assignment operator could not
be generated because a base class
 assignment operator is inaccessible or deleted
c:\users\user\downloads\tufao-master\src\priv\../httpserverrequest.h(353)
: warning C4625: 'Tufao::HttpServerRequest' : copy constructor could not be
generated because a base cl
ass copy constructor is inaccessible or deleted
c:\users\user\downloads\tufao-master\src\priv\../httpserverrequest.h(353)
: warning C4626: 'Tufao::HttpServerRequest' : assignment operator could not
be generated because a base
 class assignment operator is inaccessible or deleted
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qmap.h(380)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replacing w
ith '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qdatastream.h(182)
: warning C4820: 'QDataStream' : '2' bytes padding added after data member
'QDataStream::noswap'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstringmatcher.h(86)
: warning C4820: 'QStringMatcher::Data' : '4' bytes padding added after
data member 'QStringMatc
her::Data::len'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qstringmatcher.h(90)
: warning C4820: 'QStringMatcher' : '4' bytes padding added after data
member 'QStringMatcher::q
_cs'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qvariant.h(365)
: warning C4820: 'QVariant::PrivateShared' : '4' bytes padding added after
data member 'QVariant::Pri
vateShared::ref'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qvariant.h(404)
: warning C4820: 'QVariant::Private' : '4' bytes padding added after data
member 'QVariant::Private::
is_null'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qtextstream.h(223)
: warning C4820: 'QTextStreamManipulator' : '2' bytes padding added after
data member 'QTextStream
Manipulator::ch'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qvector.h(110)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replacin
g with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qvector.h(262)
: warning C4619: #pragma warning : there is no warning number '4345'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qvector.h(334)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replacin
g with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qvector.h(491)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replacin
g with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qvector.h(559)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replacin
g with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qset.h(94) :
warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro, replacing wi
th '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qcontiguouscache.h(107)
: warning C4668: 'definedQT_NO_UNSHARABLE_CONTAINERS' is not defined as a
preprocessor macro,
 replacing with '0' for '#if/#elif'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qdebug.h(73)
: warning C4820: 'QDebug::Stream' : '6' bytes padding added after data
member 'QDebug::Stream::message_o
utput'
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qdebug.h(74)
: warning C4625: 'QDebug::Stream' : copy constructor could not be generated
because a base class copy co
nstructor is inaccessible or deleted
c:\Qt\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore/qdebug.h(74)
: warning C4626: 'QDebug::Stream' : assignment operator could not be
generated because a base class assi
gnment operator is inaccessible or deleted
c:\Qt\qt5.3.0\5.3\msvc2013_64_opengl\include\qtcore\qtimer.h(113)
: warning C4365: '=' : conversion from 'bool' to 'uint', signed/unsigned
mismatch
c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(79) :
warning C4820: 'Tufao::HttpServerRequest::Priv' : '2' bytes padding added
after data member 'Tufao::HttpS
erverRequest::Priv::useTrailers'
c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(85) :
warning C4820: 'Tufao::HttpServerRequest::Priv' : '4' bytes padding added
after data member 'Tufao::HttpS
erverRequest::Priv::httpVersion'
c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(88) :
warning C4820: 'Tufao::HttpServerRequest::Priv' : '4' bytes padding added
after data member 'Tufao::HttpS
erverRequest::Priv::responseOptions'
c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(91) :
warning C4820: 'Tufao::HttpServerRequest::Priv' : '4' bytes padding added
after data member 'Tufao::HttpS
erverRequest::Priv::timeout'
c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(94) :
warning C4512: 'Tufao::HttpServerRequest::Priv' : assignment operator could
not be generated

c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(39) :
see declaration of 'Tufao::HttpServerRequest::Priv'
c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(99) :
error C2146: syntax error : missing ';' before identifier 'RawData'
c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(99) :
error C2238: unexpected token(s) preceding ';'
c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(99) :
error C2143: syntax error : missing ';' before '<end Parse>'
c:\users\user\downloads\tufao-master\src\priv/httpserverrequest.h(104) :
error C2238: unexpected token(s) preceding ';'
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(81) :
error C2065: 'body' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(82) :
error C2065: 'body' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(129) :
warning C4365: 'argument' : conversion from 'int' to 'size_t',
signed/unsigned mismatch
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(148) :
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible
loss of data
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(148) :
warning C4365: 'argument' : conversion from 'size_t' to 'int',
signed/unsigned mismatch
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(196) :
error C2065: 'settings' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(198) :
error C2065: 'settings' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(199) :
error C2065: 'settings' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(200) :
error C2065: 'settings' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(201) :
error C2065: 'settings' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(203) :
error C2065: 'settings' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(204) :
error C2065: 'settings' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(207) :
error C2065: 'settings' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(225) :
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible
loss of data
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(225) :
warning C4365: 'argument' : conversion from 'size_t' to 'int',
signed/unsigned mismatch
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(236) :
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible
loss of data
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(236) :
warning C4365: 'argument' : conversion from 'size_t' to 'int',
signed/unsigned mismatch
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(239) :
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible
loss of data
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(239) :
warning C4365: 'argument' : conversion from 'size_t' to 'int',
signed/unsigned mismatch
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(256) :
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible
loss of data
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(256) :
warning C4365: 'argument' : conversion from 'size_t' to 'int',
signed/unsigned mismatch
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(262) :
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible
loss of data
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(262) :
warning C4365: 'argument' : conversion from 'size_t' to 'int',
signed/unsigned mismatch
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(267) :
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible
loss of data
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(267) :
warning C4365: 'argument' : conversion from 'size_t' to 'int',
signed/unsigned mismatch
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(270) :
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible
loss of data
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(270) :
warning C4365: 'argument' : conversion from 'size_t' to 'int',
signed/unsigned mismatch
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(292) :
error C4430: missing type specifier - int assumed. Note: C++ does not
support default-int
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(292) :
error C2146: syntax error : missing ';' before identifier 'methods'
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(292) :
error C2065: 'methods' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(292) :
error C2988: unrecognizable template declaration/definition
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(292) :
error C2059: syntax error : ']'
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(292) :
error C2143: syntax error : missing ';' before '{'
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(293) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(294) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(295) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(296) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(297) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(298) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(299) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(300) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(301) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(302) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(303) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(304) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(305) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(306) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(307) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(308) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(309) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(310) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(311) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(312) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(313) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(314) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(315) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(316) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(317) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(318) :
error C2065: 'MT' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(319) :
error C2143: syntax error : missing ';' before '}'
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(321) :
error C2065: 'methods' : undeclared identifier
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(322) :
error C3536: 'm': cannot be used before it is initialized
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(322) :
error C2660: 'QByteArray::setRawData' : function does not take 1 arguments
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(342) :
error C2070: 'const char []': illegal sizeof operand
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(349) :
error C2070: 'const char []': illegal sizeof operand
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(378) :
warning C4267: 'argument' : conversion from 'size_t' to 'int', possible
loss of data
C:\Users\user\Downloads\tufao-master\src\httpserverrequest.cpp(378) :
warning C4365: 'argument' : conversion from 'size_t' to 'int',
signed/unsigned mismatch
NMAKE : fatal error U1077: 'c:\PROGRA~2\MICROS~2.0\VC\bin\amd64\cl.exe' :
return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio
12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.

@vinipsmaker
Copy link
Owner

According to http://cpprocks.com/c1114-compiler-and-library-shootout/ Visual Studio 2013 doesn't support constexpr without the CTP addon.

This feature is used during the definition of the RawData structure and looks like the Visual Studio lexer figured it out everything wrong.

The constexpr keyword isn't really needed and you should be able to remove its use without further damage to get a working/compilable code. I cannot try it myself, because my desktop system, where I used to have a working Windows virtual machine is refusing to read the my external HD, where I keep the virtual machine image.

@vinipsmaker
Copy link
Owner

Another thing you can try is to install the november CTP.

@dasloop
Copy link
Author

dasloop commented May 26, 2014

Seems that Update 2 doesn't includes the November CTP.

I will check the changes on constexpr.

On Mon, May 26, 2014 at 12:49 PM, Vinícius dos Santos Oliveira <
notifications@github.com> wrote:

Another thing you can try is to install the november CTPhttp://www.reddit.com/r/cpp/comments/12j71g/visual_c_announcing_november_ctp_of_the_c/
.


Reply to this email directly or view it on GitHubhttps://github.com//issues/46#issuecomment-44178140
.

ALT David in a Loop

@dasloop
Copy link
Author

dasloop commented May 26, 2014

Removing just that constexpr solves the compilation problem, Now the error occours when compiling the samples (sessionusage);

        cl -c -nologo -Zm200 -Zc:wchar_t -FS -O2 -MD -GR -W3 -w34100 -w34189 -EHsc -DUNICODE -DWIN32 -DWIN64 -DTUFAO_VERSION_MAJOR=1 -DQT_NO_DEBUG -DQT_NETWORK_LIB -DQT_CORE_LIB -D
NDEBUG -I"C:\win64app_vc12\Qt5.3.0\5.3\msvc2013_64_opengl\include\tufao-1" -I"C:\win64app_vc12\Qt5.3.0\5.3\msvc2013_64_opengl\include" -I"C:\win64app_vc12\Qt5.3.0\5.3\msvc2013_64_o
pengl\include\QtNetwork" -I"C:\win64app_vc12\Qt5.3.0\5.3\msvc2013_64_opengl\include\QtCore" -I"release" -I"C:\win64app_vc12\Qt5.3.0\5.3\msvc2013_64_opengl\mkspecs\win32-msvc2013" -
Forelease\ @C:/Users/martijn/AppData/Local/Temp\nmBB77.tmp
main.cpp
C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xrefwrap(283) : error C2064: term does not evaluate to a function taking 2 arguments
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(228) : see reference to function template instantiation '_Ret std::_Callable_obj<SetHandler,false>
::_ApplyX<_Rx,Tufao::HttpServerRequest&,Tufao::HttpServerResponse&>(Tufao::HttpServerRequest &,Tufao::HttpServerResponse &)' being compiled
        with
        [
            _Ret=bool
,            _Rx=bool
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(228) : see reference to function template instantiation '_Ret std::_Callable_obj<SetHandler,false>
::_ApplyX<_Rx,Tufao::HttpServerRequest&,Tufao::HttpServerResponse&>(Tufao::HttpServerRequest &,Tufao::HttpServerResponse &)' being compiled
        with
        [
            _Ret=bool
,            _Rx=bool
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(226) : while compiling class template member function 'bool std::_Func_impl<_MyWrapper,_Alloc,_Ret
,Tufao::HttpServerRequest &,Tufao::HttpServerResponse &>::_Do_call(Tufao::HttpServerRequest &,Tufao::HttpServerResponse &)'
        with
        [
            _Alloc=std::allocator<std::_Func_class<bool,Tufao::HttpServerRequest &,Tufao::HttpServerResponse &>>
,            _Ret=bool
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(495) : see reference to class template instantiation 'std::_Func_impl<_MyWrapper,_Alloc,_Ret,Tufao
::HttpServerRequest &,Tufao::HttpServerResponse &>' being compiled
        with
        [
            _Alloc=std::allocator<std::_Func_class<bool,Tufao::HttpServerRequest &,Tufao::HttpServerResponse &>>
,            _Ret=bool
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(396) : see reference to function template instantiation 'void std::_Func_class<_Ret,Tufao::HttpSer
verRequest &,Tufao::HttpServerResponse &>::_Do_alloc<_Myimpl,SetHandler&,_Alloc>(_Fty,_Alloc)' being compiled
        with
        [
            _Ret=bool
,            _Alloc=std::allocator<std::_Func_class<bool,Tufao::HttpServerRequest &,Tufao::HttpServerResponse &>>
,            _Fty=SetHandler &
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(396) : see reference to function template instantiation 'void std::_Func_class<_Ret,Tufao::HttpSer
verRequest &,Tufao::HttpServerResponse &>::_Do_alloc<_Myimpl,SetHandler&,_Alloc>(_Fty,_Alloc)' being compiled
        with
        [
            _Ret=bool
,            _Alloc=std::allocator<std::_Func_class<bool,Tufao::HttpServerRequest &,Tufao::HttpServerResponse &>>
,            _Fty=SetHandler &
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(385) : see reference to function template instantiation 'void std::_Func_class<_Ret,Tufao::HttpSer
verRequest &,Tufao::HttpServerResponse &>::_Reset_alloc<SetHandler&,std::allocator<std::_Func_class<_Ret,Tufao::HttpServerRequest &,Tufao::HttpServerResponse &>>>(_Fty,_Alloc)' bei
ng compiled
        with
        [
            _Ret=bool
,            _Fty=SetHandler &
,            _Alloc=std::allocator<std::_Func_class<bool,Tufao::HttpServerRequest &,Tufao::HttpServerResponse &>>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(385) : see reference to function template instantiation 'void std::_Func_class<_Ret,Tufao::HttpSer
verRequest &,Tufao::HttpServerResponse &>::_Reset_alloc<SetHandler&,std::allocator<std::_Func_class<_Ret,Tufao::HttpServerRequest &,Tufao::HttpServerResponse &>>>(_Fty,_Alloc)' bei
ng compiled
        with
        [
            _Ret=bool
,            _Fty=SetHandler &
,            _Alloc=std::allocator<std::_Func_class<bool,Tufao::HttpServerRequest &,Tufao::HttpServerResponse &>>
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(671) : see reference to function template instantiation 'void std::_Func_class<_Ret,Tufao::HttpSer
verRequest &,Tufao::HttpServerResponse &>::_Reset<SetHandler&>(_Fty)' being compiled
        with
        [
            _Ret=bool
,            _Fty=SetHandler &
        ]
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(671) : see reference to function template instantiation 'void std::_Func_class<_Ret,Tufao::HttpSer
verRequest &,Tufao::HttpServerResponse &>::_Reset<SetHandler&>(_Fty)' being compiled
        with
        [
            _Ret=bool
,            _Fty=SetHandler &
        ]
        .\main.cpp(56) : see reference to function template instantiation 'std::function<bool (Tufao::HttpServerRequest &,Tufao::HttpServerResponse &)>::function<SetHandler&>(_Fx)'
 being compiled
        with
        [
            _Fx=SetHandler &
        ]
        .\main.cpp(56) : see reference to function template instantiation 'std::function<bool (Tufao::HttpServerRequest &,Tufao::HttpServerResponse &)>::function<SetHandler&>(_Fx)'
 being compiled
        with
        [
            _Fx=SetHandler &
        ]
readhandler.cpp
sethandler.cpp
unsethandler.cpp
Generating Code...
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"c:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\BIN\amd64\nmake.exe"' : return code '0x2'
Stop.

@vinipsmaker
Copy link
Owner

This time looks like the problem is related to good initializer lists or library support (std::function).

You could try to change the sample to map one handler at time. Maybe this will help the Visual Studio parser.

Anyway, it's clear that the problem is incomplete C++11 support from Visual Studio. I'll close the issue, but we can continue to use it to help you work around this problem.

@dasloop
Copy link
Author

dasloop commented May 28, 2014

I have installed the 2013 November CTP version. Still failing at the same place BUT the error is not due to the initializer lists but by std::function.

The error:

C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\xrefwrap(283) : error C2064: term does not evaluate to a function taking 2 arguments
        C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\INCLUDE\functional(228) : see reference to function template instantiation '_Ret std::_Callable_obj<SetHandler,false>
::_ApplyX<_Rx,Tufao::HttpServerRequest&,Tufao::HttpServerResponse&>(Tufao::HttpServerRequest &,Tufao::HttpServerResponse &)' being compiled

Refers to the usage of Handler in the HttpServerRequestRouter::Mapping constructor. A solution is to use std::bind as:

MyHandler     myhandler;
HttpServerRequestRouter router;

router.map( HttpServerRequestRouter::Mapping( QRegularExpression("/my_route"), std::bind(&MyHandler::handleRequest, &myhandler, std::placeholders::_1, std::placeholders::_2));

@vinipsmaker
Copy link
Owner

[...] BUT the error is not due to the initializer lists but by std::function.

[...]

A solution is to use std::bind [...]

Good you found a solution that worked for this old VS compiler. Unfortunately std::function is used a lot and this workaround may spread a lot on your code.

@vinipsmaker
Copy link
Owner

Another CTP was released. Maybe it would work now.

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

2 participants