0

I've been trying to install a package on my Windows machine using Git bash. I encounter the error: fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directoryerror', which multiple StackOverflow questions try to address (see here, here2 and here3). There's no shortage of possible answers but no updated/current solutions.

By way, I came across a possible solution, offered by the link below, which suggests to create 3 files, time.h, times.h and times.cpp. The problem is, it's unclear to me where to place these three files - the author suggests to put them in the same "project folder" but this is unclear to me. I created a folder sys with these three files in the same project and tried to compile, to no avail. Is there something simple I'm overlooking?

https://www.codefull.net/2015/12/systime-h-replacement-for-windows/

batlike
  • 668
  • 1
  • 7
  • 19
  • which package are you trying to install? – JohnFilleau Oct 04 '20 at 17:24
  • It is a small polymer modeling package PolymerCpp (https://github.com/kmdouglass/PolymerCpp) . Because it is not so popular, I couldn't find a Windows binary from https://www.lfd.uci.edu/~gohlke/pythonlibs/ – batlike Oct 04 '20 at 17:25
  • And what are you using to compile/link your project? Are you using a makefile or something? How do you turn the source code into executable code? – JohnFilleau Oct 04 '20 at 17:25
  • There is a makefile, but I am using setup.py to deploy the Python application – batlike Oct 04 '20 at 17:28
  • No idea if this will work: throw the .h files in the include directory, and the .ccp file in the PolymerCPP/core directory. Looks like the makefile should handle the rest. Maybe. – JohnFilleau Oct 04 '20 at 17:29
  • Thanks for the suggestion. I gave it a shot, but am still encountering the same error. Rather than installing the entire package, I've also tried just compiling the shared library, but since I am using Git for windows I encounter an ```incompatible versions of cygwin DLL``` error – batlike Oct 04 '20 at 17:38
  • 1
    You could try this methond: create a robust header file.You could refer to this [link](https://stackoverflow.com/questions/22384020/visual-studio-trying-to-include-linux-headers-despite-if-statement) . #if defined(_WIN32) # if defined(_WIN64) /*64 bit windows*/ # else /*32 bit windows*/ # endif #endif – Barrnet Chou Oct 06 '20 at 02:51

0 Answers0