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

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

Open
Lyoko-Jeremie opened this issue Aug 3, 2020 · 0 comments

Comments

@Lyoko-Jeremie
Copy link

Lyoko-Jeremie commented Aug 3, 2020

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 added a commit to Lyoko-Jeremie/BeastHttp that referenced this issue Aug 3, 2020
can change all the "#if not defined" to "#ifndef" to support msvc
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

1 participant