BeastHttp icon indicating copy to clipboard operation
BeastHttp copied to clipboard

[MSVC] warning C4067: unexpected tokens following preprocessor directive - expected a newline

Open Lyoko-Jeremie opened this issue 4 years ago • 0 comments

when i try the code of BeastHttp/src/examples/reactor/main.cxx in vs2019 . it tell me warning C4067: unexpected tokens following preprocessor directive - expected a newline .
and i check it, the listener.hxx(1) is : #if not defined BEASTHTTP_REACTOR_LISTENER_HXX

when i change it to #ifndef BEASTHTTP_REACTOR_LISTENER_HXX , the error disappear . seems like the msvc c++ not support #if not defined , only support #ifndef .

can change all the #if not defined to #ifndef to support msvc ?

follow is some of the error info :

H:\Code\CLionProjects\VorzeControlServer\src\3thlib\BeastHttp\BeastHttp\include\http/reactor/listener.hxx(1): warning C4067: unexpected tokens following preprocessor directive - expected a newline
H:\Code\CLionProjects\VorzeControlServer\src\3thlib\BeastHttp\BeastHttp\include\http/reactor/session.hxx(1): warning C4067: unexpected tokens following preprocessor directive - expected a newline
H:\Code\CLionProjects\VorzeControlServer\src\3thlib\BeastHttp\BeastHttp\include\http/basic_router.hxx(1): warning C4067: unexpected tokens following preprocessor directive - expected a newline
H:\Code\CLionProjects\VorzeControlServer\src\3thlib\BeastHttp\BeastHttp\include\http/out.hxx(1): warning C4067: unexpected tokens following preprocessor directive - expected a newline
H:\Code\CLionProjects\VorzeControlServer\src\main.cpp(112): error C2871: "_0xdead4ead" : a namespace with this name does not exist
H:\Code\CLionProjects\VorzeControlServer\src\main.cpp(114): error C2871: "http" : a namespace with this name does not exist

Lyoko-Jeremie avatar Aug 03 '20 03:08 Lyoko-Jeremie