Closed Logan007 closed 2 years ago
Might be different issues:
Umm, at least locally, I am able to compile on Windows if I add
#ifdef _WIN64
typedef unsigned __int64 ssize_t;
#else
typedef _W64 unsigned int ssize_t;
#endif
to the very beginning of thirdparty/libnatpmp/natpmpc.c
file...
... and CMake Action runs green with libnatpmp
support disabled.
So, do we have to disable libnatpmp
support on Windows/CMake?
Or, is anyone aware of how to apply a patch to submodules on Windows? git
must be installed (to fetch the submodules) anyway, but I have not found a way to have git
apply a patch to untracked (submodule) files.
Perhaps, we could create a fork of that libnatpmp
, patch it, and use the patched commit as submodule instead?
Suggestions are welcome!
Just for a couple of datapoints:
I will try to change the libnatpmp
submodule to this commit – keep your fingers crossed!
we really dont want to change the submodule - that defeats much of the purpose of submodules!
To keep a compile-able dev, I see no other option than to disable libnatpmp
support on Windows until we come up with a better solution.
Hrm, perhaps I have misunderstood - what does the libnatpmp part do? with a quick look at the linux cmake build, it seemed like it was not compiled.
If simply removing it from the compile works, then what feature is lost?
There are two protocols for enabling port forwarding, upnp and pmp. So, pmp would be lost on pure MSVC WIndows builds (not MinGW as it has uses different compiler I guess).
oh, but of course. Why have one way that is fragile and takes an entire XML parser, when you could have several!
Hereby, f0c37c7 officially is dedicated to you! :wink:
ssize_t
is SIGNED !
With upstream libnatpmp
being adapted for Windows compile, we can revert #914 and #917. Any objection?
It looks like we are having difficulties with the upnp/pmp 3rd party libraries, also see the output CMake runner at Actions tab.