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 compilation errors with 4.7 release. #446

Closed
SylvainCorlay opened this issue Sep 30, 2020 · 7 comments · Fixed by #447
Closed

MSVC compilation errors with 4.7 release. #446

SylvainCorlay opened this issue Sep 30, 2020 · 7 comments · Fixed by #447

Comments

@SylvainCorlay
Copy link
Contributor

Actually, syntax errors. probably with the ZMQ_DEPRECATED macro.

 _deps\cppzmq-src\zmq.hpp(441): error C2061: syntax error: identifier 'message_t'
  _deps\cppzmq-src\zmq.hpp(448): error C2065: 'Range': undeclared identifier
  _deps\cppzmq-src\zmq.hpp(448): error C2923: 'zmq::detail::is_range': 'Range' is not a valid template type argument for parameter 'T'
  _deps\cppzmq-src\zmq.hpp(449): error C2065: 'Range': undeclared identifier
  _deps\cppzmq-src\zmq.hpp(449): error C2923: 'zmq::detail::range_value_t': 'Range' is not a valid template type argument for parameter 'Range'
  _deps\cppzmq-src\zmq.hpp(450): error C2065: 'Range': undeclared identifier
  _deps\cppzmq-src\zmq.hpp(450): error C2923: 'zmq::detail::range_value_t': 'Range' is not a valid template type argument for parameter 'Range'
  _deps\cppzmq-src\zmq.hpp(451): error C2065: 'Range': undeclared identifier
  _deps\cppzmq-src\zmq.hpp(451): error C2923: 'std::is_same': 'Range' is not a valid template type argument for parameter '_Ty1'
  _deps\cppzmq-src\zmq.hpp(452): error C2334: unexpected token(s) preceding ':'; skipping apparent function body
  _deps\cppzmq-src\zmq.hpp(718): error C3927: '->': trailing return type is not allowed after a non-function declarator
  _deps\cppzmq-src\zmq.hpp(718): error C3484: syntax error: expected '->' before the return type
  _deps\cppzmq-src\zmq.hpp(718): error C3613: missing return type after '->' ('int' assumed)
  _deps\cppzmq-src\zmq.hpp(718): error C3646: 'swap': unknown override specifier
  _deps\cppzmq-src\zmq.hpp(718): error C2988: unrecognizable template declaration/definition
  _deps\cppzmq-src\zmq.hpp(718): error C2059: syntax error: '('
  _deps\cppzmq-src\zmq.hpp(718): error C2238: unexpected token(s) preceding ';'
  _deps\cppzmq-src\zmq.hpp(722): error C2236: unexpected token 'enum class'. Did you forget a ';'?
  _deps\cppzmq-src\zmq.hpp(386): error C2065: 'msg': undeclared identifier
  _deps\cppzmq-src\zmq.hpp(392): error C2065: 'msg': undeclared identifier
  _deps\cppzmq-src\zmq.hpp(412): error C2065: 'msg': undeclared identifier
  _deps\cppzmq-src\zmq.hpp(418): error C3861: 'data': identifier not found
  _deps\cppzmq-src\zmq.hpp(424): error C2065: 'msg': undeclared identifier
  _deps\cppzmq-src\zmq.hpp(882): error C2027: use of undefined type 'zmq::context_t'
  _deps\cppzmq-src\zmq.hpp(767): note: see declaration of 'zmq::context_t'
  _deps\cppzmq-src\zmq.hpp(960): warning C4544: '<Unknown>': default template argument ignored on this template declaration
  _deps\cppzmq-src\zmq.hpp(965): error C3203: 'recv_buffer_size': unspecialized class template can't be used as a template argument for template parameter 'T', expected a real type
  _deps\cppzmq-src\zmq.hpp(1847): error C2039: 'handle': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(1897): error C2039: 'handle': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(1927): error C2039: 'handle': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(1943): error C2955: 'zmq::recv_buffer_size': use of class template requires template argument list
  _deps\cppzmq-src\zmq.hpp(888): note: see declaration of 'zmq::recv_buffer_size'
  _deps\cppzmq-src\zmq.hpp(1956): error C2039: 'handle': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(1955): error C2789: 'nbytes': an object of const-qualified type must be initialized
  _deps\cppzmq-src\zmq.hpp(1955): note: see declaration of 'nbytes'
  _deps\cppzmq-src\zmq.hpp(2132): error C2027: use of undefined type 'zmq::context_t'
  _deps\cppzmq-src\zmq.hpp(767): note: see declaration of 'zmq::context_t'
  _deps\cppzmq-src\zmq.hpp(2132): error C2228: left of '.handle' must have class/struct/union
  _deps\cppzmq-src\zmq.hpp(2133): error C2027: use of undefined type 'zmq::context_t'
  _deps\cppzmq-src\zmq.hpp(767): note: see declaration of 'zmq::context_t'
  _deps\cppzmq-src\zmq.hpp(2133): error C2228: left of '.handle' must have class/struct/union
  _deps\cppzmq-src\zmq.hpp(2681): error C2039: 'str': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq_addon.hpp(409): error C2039: 'more': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq_addon.hpp(502): error C2039: 'data': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq_addon.hpp(502): error C2062: type 'char' unexpected
  _deps\cppzmq-src\zmq_addon.hpp(504): error C2065: 'string': undeclared identifier
  _deps\cppzmq-src\zmq_addon.hpp(548): error C2039: 'data': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq_addon.hpp(548): error C2062: type 'char' unexpected
  _deps\cppzmq-src\zmq_addon.hpp(549): error C2065: 'string': undeclared identifier
  _deps\cppzmq-src\zmq_addon.hpp(577): error C2039: 'data': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq_addon.hpp(577): error C2039: 'size': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq_addon.hpp(577): error C2660: 'zmq::multipart_t::addmem': function does not take 1 arguments
  _deps\cppzmq-src\zmq_addon.hpp(586): error C2039: 'data': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq_addon.hpp(586): error C2062: type 'unsigned char' unexpected
  _deps\cppzmq-src\zmq_addon.hpp(587): error C2039: 'size': is not a member of 'zmq::message_t'
  _deps\cppzmq-src\zmq.hpp(382): note: see declaration of 'zmq::message_t'
  _deps\cppzmq-src\zmq_addon.hpp(620): error C2678: binary '!=': no operator found which takes a left-hand operand of type 'const zmq::message_t' (or there is no acceptable conversion)
  _deps\cppzmq-src\zmq.hpp(2086): note: could be 'bool zmq::operator !=(zmq::socket_ref,zmq::socket_ref) noexcept'
  _deps\cppzmq-src\zmq.hpp(2076): note: or       'bool zmq::operator !=(std::nullptr_t,zmq::socket_ref) noexcept'
  _deps\cppzmq-src\zmq.hpp(2072): note: or       'bool zmq::operator !=(zmq::socket_ref,std::nullptr_t) noexcept'
  _deps\cppzmq-src\zmq_addon.hpp(620): note: while trying to match the argument list '(const zmq::message_t, const zmq::message_t)'
@gummif
Copy link
Member

gummif commented Sep 30, 2020

I tried the new version using VS 16.7.5 and everything seems to work fine. Can you give more details and minimal code to reproduce?

@SylvainCorlay
Copy link
Contributor Author

SylvainCorlay commented Sep 30, 2020

VS 14 (MSVC 19.0.24241.7)

This was working with master up until 3-4 weeks ago, and the culprit line was changed then.

@SylvainCorlay
Copy link
Contributor Author

Checking if the breaking commit is ae570b0

(clang format splitting a string literal in two in a macro)

@gummif
Copy link
Member

gummif commented Sep 30, 2020

OK we will have to shorten that string I guess.

@SylvainCorlay
Copy link
Contributor Author

hum that commit is building. I should do a bisection.

@SylvainCorlay
Copy link
Contributor Author

@gummif the issue is indeed with the deprecation macro, which somehow prevents VS2015 from correctly parsing the code. Without building anything, just including the header with an empty main function will trigger the issue.

@SylvainCorlay
Copy link
Contributor Author

I tried with a one-line string but it fails...

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

Successfully merging a pull request may close this issue.

2 participants