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

Error while building Geos Release 3.13.0 in Visual Studio for platform toolset "Visual Studio 2017(v141)" #1172

Closed
psharma-gdal opened this issue Oct 3, 2024 · 3 comments · Fixed by #1173

Comments

@psharma-gdal
Copy link
Contributor

psharma-gdal commented Oct 3, 2024

Following error while building geos Release 3.13.0 in Visual Studio for platform toolset "Visual Studio 2017(v141)"

[exec] C:\geos-3.13.0\dist\include\geos/operation/relateng/TopologyPredicate.h(197): error C2679: binary '<<': no operator found which takes a right-hand operand of type 'std::string' (or there is no acceptable conversion)

This seems to build OK when platform toolset "v143"

This file TopologyPredicate.h seems to be introduced in latest release only

@psharma-gdal psharma-gdal changed the title Error while building Release 3.13.0 on Visual Studio 2019 for platform toolset "Visual Studio 2017(v141)" Error while building Release 3.13.0 in Visual Studio for platform toolset "Visual Studio 2017(v141)" Oct 3, 2024
@psharma-gdal psharma-gdal changed the title Error while building Release 3.13.0 in Visual Studio for platform toolset "Visual Studio 2017(v141)" Error while building Geos Release 3.13.0 in Visual Studio for platform toolset "Visual Studio 2017(v141)" Oct 3, 2024
@pramsey
Copy link
Member

pramsey commented Oct 3, 2024

Have a patch that works? I don't have that env here, and the code in question looks pretty anodyne.

@dr-jts
Copy link
Contributor

dr-jts commented Oct 3, 2024

I found a similar issue on SO here.

It recommends adding

#include <string>

(and maybe some other standard headers).

@psharma-gdal Can you try this and see if it fixes the problem?

@rouault
Copy link
Contributor

rouault commented Oct 3, 2024

As this is a std::ostream related operator, I believe this should rather be:

#include <ostream>

Cf https://en.cppreference.com/w/cpp/io/basic_ostream

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.

4 participants