miniball icon indicating copy to clipboard operation
miniball copied to clipboard

Build error on MSVC due to POSIX headers (sys/resource.h, sys/time.h) include in Seb_debug.h

Open quxflux opened this issue 4 years ago • 1 comments

When compiling a project which includes "Seb.h" using MSVC, compilation will fail due to the missing POSIX headers:

cpp\main/Seb_debug.h(12,10): fatal error : 'sys/resource.h' file not found

I was able to work around this in a fork of the repo by forward declaring the used timeval struct.

A cleaner way would probably to either git rid of the POSIX header dependency and rely solely on functionality from the C++ standard library (e.g. std::chrono) or at least prevent the compiler from hitting the mentioned include when SEB_DEBUG_MODE is not defined.

quxflux avatar May 16 '20 14:05 quxflux

@TheGrumpyCoda Thanks a lot for reporting this. If you have time to submit a PR, feel free to do so—very happy to take your fix/improvement in, pc course!

hbf avatar May 16 '20 17:05 hbf