0

I use Visual Studio 2017 Community. I have installed geos 3.9.1#1 via VCPKG and confirmed all is OK with 'vcpkg.exe list':

enter image description here

However, in VS I can't #include <geos.h> in my project: the compiler reports it 'cannot open source file geos.h'.

Which steps do I still need to carry out to finish the installation? These are not obvious in the documentation.

FYI: the answer to the question Where does Visual Studio look for C++ header files? does not answer this question.

Update: I tried to debug the problem by looking for the geos.h file in the vcpkg include folder but it was not found. I found only one instance of geos.h here:

source\repos\vcpkg\vcpkg\buildtrees\geos\src\3.9.1-1acf7d5768.clean\include.

There was no sign of this file in the folder that I would expect it to be in:

source\repos\vcpkg\vcpkg\packages\geos_x64-windows\include

drescherjm
  • 10,365
  • 5
  • 44
  • 64
Chris S
  • 49
  • 4
  • This should help: [https://vcpkg.readthedocs.io/en/latest/examples/installing-and-using-packages/](https://vcpkg.readthedocs.io/en/latest/examples/installing-and-using-packages/) make sure you did step 2 and executed `.\vcpkg integrate install` and restarted Visual Studio after doing so. – drescherjm Jun 29 '21 at 02:28
  • Thanks for your response. I have carried this out but still get the same compiler message with #include. BTW: I recently installed xtensor using the same method and had no problems. – Chris S Jun 29 '21 at 23:06
  • You probably need to investigate the reason for this yourself. What I mean look at the include folder in the vcpkg tree and try to figure out where `geos.h` is in that folder. – drescherjm Jun 29 '21 at 23:37
  • Thanks. Interestingly, the folder does not contain geos.h, just geos_c.h. However, I can't #include to that file either. It's in 'source\repos\vcpkg\vcpkg\packages\geos_x64-windows\include'. – Chris S Jun 30 '21 at 01:29
  • I uninstalled geos then reinstalled it. I found only one instance of geos.h here: source\repos\vcpkg\vcpkg\buildtrees\geos\src\3.9.1-1acf7d5768.clean\include. There was no sign of this file in the folder that I would expect it to be in: source\repos\vcpkg\vcpkg\packages\geos_x64-windows\include – Chris S Jun 30 '21 at 04:27
  • It may be a bug in that package. You may want to submit an issue on the microsoft github page. – drescherjm Jun 30 '21 at 13:06
  • Will do. Thanks for your support. – Chris S Jun 30 '21 at 23:31
  • Problem solved. I had installed the x64 verssion but selected the x86 solution on my IDE. When I changed the IDE to to x84 I could #include to geos.h – Chris S Jul 04 '21 at 23:03

0 Answers0