oatpp / oatpp-starter

Oatpp simple-API starter project
https://oatpp.io/
Apache License 2.0
68 stars 31 forks source link

Errors while building #4

Closed abbasshah17 closed 5 years ago

abbasshah17 commented 5 years ago

Hi, I am getting build errors while trying to build the sample oatpp-starter. Most likely I'm making a novice mistake as I have never used CMake.

Following the Started Project I downloaded and installed CMake-Win64 x64 zip.

Opened cmake-gui.exe and provided the path for the cloned project and another path for the binaries.

Clicked the Configured Button which opened up two dialogs one by one: one to create the non-existant file path for binaries and the other one to configure build.

Set the generator as VS 14 2015. Platform x64. Left Optional toolset empty. Default native compilers.

Screenshot

Got the following screen as result.

Screenshot

Clicked Generate button.

And the Opened project via VS 14 2015.

Got the following errors while trying to build.

Severity    Code    Description Project File    Line    Suppression State
Error   C2131   expression did not evaluate to a constant [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj] oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\web\protocol\http\incoming\SimpleBodyDecoder.cpp  64  
Error   C2131   expression did not evaluate to a constant [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj] oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\network\Url.cpp   36  
Error   C2131   expression did not evaluate to a constant [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj] oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\web\server\HttpConnectionHandler.cpp  60  
Error   C1083   Cannot open include file: 'unistd.h': No such file or directory [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]   oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\core\async\worker\IOEventWorker_common.cpp    27  
Error   C1083   Cannot open include file: 'unistd.h': No such file or directory [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]   oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\network\Connection.cpp    27  
Error   C1083   Cannot open include file: 'sys/socket.h': No such file or directory [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]   oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\web\client\HttpRequestExecutor.cpp    37  
Error   C1083   Cannot open include file: 'arpa/inet.h': No such file or directory [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]    oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\encoding\Hex.cpp  26  
Error   C1083   Cannot open include file: 'arpa/inet.h': No such file or directory [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]    oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\encoding\Unicode.cpp  29  
Error   C3863   array type 'v_char8 [maxLineSize+]' is not assignable [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj] oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\web\protocol\http\incoming\SimpleBodyDecoder.cpp  73  
Error   C2440   'type cast': cannot convert from 'oatpp::async::AbstractCoroutine::Action (__cdecl oatpp::web::server::HttpProcessor::Coroutine::* )(const ReturnType &)' to 'oatpp::async::AbstractCoroutine::FunctionPtr' [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]   oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\core\async\Coroutine.hpp  692 
Error   C2440   'type cast': cannot convert from 'oatpp::async::AbstractCoroutine::Action (__cdecl oatpp::web::server::HttpProcessor::Coroutine::* )(const oatpp::web::protocol::http::incoming::RequestHeadersReader::Result &)' to 'oatpp::async::AbstractCoroutine::FunctionPtr' [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]   oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\core\async\Coroutine.hpp  692 
Error   C2440   'reinterpret_cast': cannot convert from 'oatpp::async::AbstractCoroutine::Action (__cdecl oatpp::async::AbstractCoroutine::* )(void)' to 'oatpp::async::AbstractCoroutine::Action (__cdecl oatpp::async::AbstractCoroutine::MemberCaller::* )(oatpp::web::protocol::http::incoming::ResponseHeadersReader::Result)' [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]   oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\core\async\Coroutine.hpp  402 
Error   C2440   'reinterpret_cast': cannot convert from 'oatpp::async::AbstractCoroutine::Action (__cdecl oatpp::async::AbstractCoroutine::* )(void)' to 'oatpp::async::AbstractCoroutine::Action (__cdecl oatpp::async::AbstractCoroutine::MemberCaller::* )(oatpp::web::protocol::http::incoming::RequestHeadersReader::Result)' [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]    oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\core\async\Coroutine.hpp  402 
Error   C2440   'reinterpret_cast': cannot convert from 'oatpp::async::AbstractCoroutine::Action (__cdecl oatpp::async::AbstractCoroutine::* )(void)' to 'oatpp::async::AbstractCoroutine::Action (__cdecl oatpp::async::AbstractCoroutine::MemberCaller::* )(oatpp::String)' [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj] oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\core\async\Coroutine.hpp  402 
Warning C4244   '+=': conversion from 'oatpp::data::v_io_size' to 'v_int32', possible loss of data [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]    oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\web\protocol\http\incoming\RequestHeadersReader.cpp   137 
Warning C4244   '+=': conversion from 'oatpp::data::v_io_size' to 'v_int32', possible loss of data [F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp-build\src\oatpp.vcxproj]    oatpp   F:\OATPP\Projects\oatpp-starter-master\build\oatpp-prefix\src\oatpp\src\oatpp\web\protocol\http\incoming\ResponseHeadersReader.cpp  136 
Error   MSB6006 "cmd.exe" exited with code 1.   main    C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V140\Microsoft.CppCommon.targets  171 

I simply can't make head or tale of these error and I'm not even sure if this is code related or CMake related, cause those red lines look like they are errors, even though every other log in CMake seems to be OK.

lganzzzo commented 5 years ago

Hello @abbasshah17,

Thank you for your interest in the project!

Unfortunately oatpp currently is not available for Windows OS. There is feature-request open to add Windows support. https://github.com/oatpp/oatpp/issues/2

Linux/BSD/Mac are currently supported.

Regards, Leonid