Uwe Stöhr wrote:
Angus Leeming wrote:

You could do it yourself you know...


It is in their bugtracker now.

Good man!

However, you really, really should invest some time and effort in getting things to compile yourself...


I know, I know. I have MSVC now and will try to do this myself.

I hate to be a party pooper, but I'm afraid that LyX 1.3.x won't compile with MSVC. There are two reasons for this:

1. If there were some "make environment", by which I mean either an MSVC solution file or a bunch of Makefiles that could be used to invoke the MSVC compiler, then you'd find that the code compiled (probably) but failed to link. That's because of some MSVC peculiarity that regards 'structs' and 'classes' as different beasts (true in C#, not in C++). The code in LyX is 'inconsistent' in this regard; sometimes we use 'struct Foo' and elsewhere 'class Foo' for the same 'Foo'. MSVC gets confused.

The point I'm trying to make is that the LyX 1.3 code would need some (relatively minor) tweaking to get it to work with MSVC.

However, the far bigger problem is:

2. There's no build environment for the MSVC compiler. In LyX 1.4 we have Asger's masterful lyx.sln solution file with which to build LyX with MSVC. In LyX 1.3 we have only the GNU autotools-generated Makefiles. Unfortunately, it's currently impossible to get these autotools-generated Makefiles to invoke the MSVC compiler in a syntax that this compiler understands.

There is a work around. It is possible to get the Makefiles to call 'wrapmsvc' to compile each C++ file. 'wrapmsvc' is a little executable that takes a bunch of arguments understood by the g++ compiler and translates these arguments into something understood by MSVC. All very clever; it means that it should be possible to build LyX within an MSYS environment (so that the GNU autotools will work) but using MSVC as the compiler (through wrapmsvc).

I say 'should' be possible. However, I never succeeded in doing so myself. First, you'd need to install Cygwin, because wrapmsvc uses the Cygwin path mapping functions to translate unix/style/paths to C:\Windows\ones. I got that much working. However, I failed to get wrapmsvc to run properly, so gave up. It may be that you would succeed where I failed. Certainly, Ruurd used to use this wrapmsvc tool to build his port.

If all this sounds daunting, it is :(

In summary, the only way to compile LyX 1.3 on Windows ATM is to use the MinGW/MSYS environment. Ie, to use g++ with its extraordinarily long link times. Having said that, once you've set up this environment, building LyX is as trivial as typing "sh build_lyxwin.sh 'lyx-1.3.7pre4'" in the development/Win32/packaging directory.

Sorry to have to be the bringer of bad news.

Angus

Reply via email to