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

Fix link error in provide_prefix with some compilers #212

Merged
merged 1 commit into from
Sep 17, 2020

Conversation

robinlinden
Copy link
Contributor

@robinlinden robinlinden commented Sep 17, 2020

Serializing arrays require providing a zone to msgpack for it to be
happy (sometimes).

My commit adding CI was based on a commit older than the one where I fixed the provide_prefix example not being compiled, so I didn't notice it was broken when I tested things.

I also can't reproduce the linker error locally, but it seems that msgpack always requires a zone when the type you serialize maps to a MAP or ARRAY, and on CI "prefix" mapped to char[7], so that's an array in msgpack, I suppose.

See: https://github.com/msgpack/msgpack-c/wiki/v1_1_cpp_object

The error:

/usr/bin/ld: CMakeFiles/provide_prefix.dir/provide_prefix.cpp.o: in function `msgpack::v2::object::object<char [7]>(char const (&) [7])':
/usr/include/msgpack/v2/object_fwd.hpp:36: undefined reference to `void msgpack::v1::operator<< <char, 7ul>(msgpack::v2::object&, char const (&) [7ul])'

Serializing arrays require providing a zone to msgpack for it to be
happy (sometimes).
@oberstet oberstet merged commit dac9eef into crossbario:master Sep 17, 2020
@oberstet
Copy link
Contributor

+1

OT: not sure if you noticed #206 - different users, more opinions;)

@robinlinden
Copy link
Contributor Author

Ah, yeah, I don't think the library should move to C++20-only. I was only explaining why I didn't use the nicer [=, this] syntax. :) It might be nice to have a setting to use std::future instead of boost::future though? At least if they reach feature-parity in C++23, for now all of that nice stuff is experimental.

See: http://open-std.org/JTC1/SC22/WG21/docs/papers/2018/p0443r7.html, https://en.cppreference.com/w/cpp/experimental/future

@robinlinden robinlinden deleted the add-ci branch September 18, 2020 07:29
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 this pull request may close these issues.

2 participants