Open leielyq opened 2 years ago
Hey @leielyq :)
I'd be happy to fix the Windows build. I'm just lacking a Windows machine atm. Could you provide me with some information about the errors and your build environment please?
@kyr0
https://github.com/kyr0/libsharedmemory/blob/master/include/libsharedmemory/libsharedmemory.hpp line:94 “size_ ” Undefined
I researched reasons.
size_
undefined
_size
unistd.h
not found
io.h
on WIN32
#if defined(_WIN32)
#include <io.h>
#else
#include <unistd.h>
#endif
Memory
definition is separated into header and body
.cpp
, but this is not ideal as header-only library.Mainly because of 3rd reason, I cannot prepare well defined header-only PR, but I can create PR with .cpp
. (You may achieve header-only as redifining whole Memory
class in each OS specific macros.)
You can refer below, as a real working PR on Win/Mac/Linux, but I totally rewritten as Godot specific code, so some fixes are needed as for the original code. https://github.com/funatsufumiya/godot_sharedmemory/tree/main/libsharedmemory
I also ported to OpenFrameworks. Tested working well on Win/Mac/Linux. https://github.com/funatsufumiya/ofxSharedMemory
It is easy to get started by looking at the description api, do you still maintain it?