On Tue, 21 Jul 2015, Steve Lhomme wrote:

On Tue, Jul 21, 2015 at 4:46 PM, Martin Storsjö <[email protected]> wrote:
On Tue, 21 Jul 2015, Steve Lhomme wrote:

renaming /usr/bin/link.exe in msys2 to /usr/bin/link preserves the pathes
and allows using MSVC when it's in the PATH
---
configure | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)


So this still requires you to hack your environment? I'd rather skip the
workaround if it requires you to have a nonstandard environment setup...

link in msys should be called without the exe all the time. So it's a
very minor tweak.

It still requires modifying the surrounding msys environment, which I'd consider a no-no. (I.e., completely ok to in your local environment, but I wouldn't go on and suggest it in the docs, even less change configure to require/assume it).

Compared to messing with the PATH order, as suggested.

Uhm, your definition of "huge hack" is totally different than mine - nothing anywhere _forces_ the msys paths to be before the msvc ones (keep in mind that there is no full PATH that contains both msvc and msys in one single line; it's all assembled by small pieces in your own environment, and that environment may be very different from mine).

If possible, just make sure that the VC paths are earlier in the path than
/usr/bin.

No, that is wrong. msys_shell.bat puts all the Msys env before
whatever was in PATH. And you don't want all kinds of things in your
PATH messing with msys. Nor rewrite the pathes to VS tools manually.

Yes, but please note that this assumes that you set up the environment in one specific order (first the vcvars.bat, then msys on top of it) - nothing really says that you need to do it that way; what if the msvc paths are added _after_ initializing the msys environment? I'm aware this probably is the way things are done in most cases (and that's what I do myself), but don't assume this is the only way things can be done.

Also keep in mind that the fact that you build using the msvc compiler does _not_ imply using msys/msys2/cygwin as shell environment - I regularly build with msvc in normal linux bash, with msvc wrapped in wine. Don't add any assumptions that break this.

// Martin
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to