lv2 / lilv

LV2 host library
ISC License
37 stars 20 forks source link

Mingw-w64 provides CreateSymbolicLink{A,W} decls #33

Closed hiirotsuki closed 4 years ago

hiirotsuki commented 4 years ago

Both mingw-w64 and mingw.org provides CreateSymbolicLink forward declarations in winbase.h, this unbreaks building with modern mingw-w64.

drobilla commented 4 years ago

... and probably breaks the build with old ones? Will have to check with @x42 what Ardour is using in particular.

If this is fine, then the entire thing can go. Ancient MSVC is not supported.

hiirotsuki commented 4 years ago

Mmm, it might be better to check if the functions are declared with waf then; if that's possible?

hiirotsuki commented 4 years ago

Actually, simply adding an extern function declaration for CreateSymbolicLink{A,W} should work for both old and new mingw(-w64)

x42 commented 4 years ago

The current version compiles and links with mingw-4.9.1 and mingw-8.3.0 (cross-compile).

drobilla commented 4 years ago

It's presumably possible, but I don't have a machine to test that with either.

CI builds with whatever is in Debian stable.

drobilla commented 4 years ago

Just removing this does indeed break the build, a better solution will be needed for some time.

In the grand scheme of things, lilv needs a graceful way to not use symlinks at all for state to actually work properly on typical non-developer Windows machines, but that's a whole thing...

carlo-bramini commented 4 years ago

Hello, if I can write my opinion, I disagree with this patch. In the past, I also got this problem when compiling the dependencies for Audacity, but in my opinion it would be better to just rename the function. In my sources, I just renamed the function from CreateSymbolicLink() to local_CreateSymbolicLink() and the issue is resolved, without breaking the compatibility with Windows XP.

drobilla commented 4 years ago

Should be fixed in 81babb7