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

Compile demo in Microsoft Visual Studio Professional 2017 #45

Open
ranet24 opened this issue Feb 22, 2018 · 5 comments
Open

Compile demo in Microsoft Visual Studio Professional 2017 #45

ranet24 opened this issue Feb 22, 2018 · 5 comments
Labels

Comments

@ranet24
Copy link

ranet24 commented Feb 22, 2018

Hi! I have some problems with compilation "demo" in Microsoft Visual Studio Professional 2017.

I can't to compile the function "static mapbox::geometry::value parseValue(protozero::data_view const& value_view)" in the module vector_tile.hpp with message "error C2679: binary '=': no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)" and so on (see image please).

vectortiletestcompile

Can any body help me please to modify sources for compile them with Microsoft Visual Studio Professional 2017?

With best regadrs, Andrey Chernyshov

@flippmoke
Copy link
Member

@ranet24 that looks like an error with mapbox::variant or something else. What versions of all dependencies are you using?

@flippmoke flippmoke added the 1.x label Feb 22, 2018
@ranet24
Copy link
Author

ranet24 commented Feb 22, 2018

I'm using the latest versions of dependensies downloaded from links:
https://github.com/mapbox/vector-tile
https://github.com/mapbox/protozero
https://github.com/mapbox/variant
https://github.com/mapbox/geometry.hpp
with small modification of #include <experimental/optional> to #include < optional >
And if I comment these switch, the rest of the sources are compiled correctly.

@flippmoke
Copy link
Member

@ranet24 could you try with these versions of the libraries? https://github.com/mapbox/vector-tile/blob/master/Makefile#L15-L17

I should note also that 1.x series is approaching end of life and support, we are currently working towards a 2.x version. Depending on what your needs are 2.x might be ready or you might need to wait for more support. We might be changing the API some until release though in 2.x, so 1.x should be considered stable.

@ranet24
Copy link
Author

ranet24 commented Feb 22, 2018

Succeeded! Thanks! You helped me a lot!

@yuziqii
Copy link

yuziqii commented Apr 2, 2022

Hey, I got the same problem in Microsoft Visual Studio Professional 2019.

It can't compile successfully (see the picture below please). And I've tried the solution #45 (comment). It didn't work.

I also tried on my virtual machine(Ubuntu 20.04), It works perfectly. So I wonder if it's a compiler related problem?

Any help would appreciate! Thanks!

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants