Closed vladfaust closed 3 years ago
Actually, uv_ip4_addr
is a function and taking its address is a constant expression.
Though, it's not when the library is dynamically loaded. Can I ask you to repeat the test with a statically linked version of libuv
if possible?
Thank you very much.
@skypjack I've managed to successfully link with static libuv with both Windows and MinGW64 CLang(s). It is enough for my case -- writing a compiler --, but I still think it is a mistake to rely on PIC in the wrapper.
Yup, I agree with you. I wasn't suggesting to do that to solve the problem. Your feedback helped to confirm my guess though. 😉
Hello,
The code does not compile with CLang 10 neither on native Windows (LLVM prebuilt) nor MinGW64:
It does compile on MinGW64 GCC, though.
I guess that the problem is that taking an address of a variable is not a constant expression.