[colm] build colm on windows

Peter Reijnders peter.reijnders at verpeteren.nl
Wed Mar 22 05:23:14 UTC 2017


Hello

Coincidently, the last couple of weeks, I've been in the process of
porting another application to msvc. I just gave it a try but there are
several things `not working out of the box` (yet). It seems that there
is still some work needed to have a complete clean msvc build.

you probably need:

1. Some unixy tools like bash, make, sed etc. but also some automake,
autoconf, autoheader. The easiest way is to use mozilla's  all in one
package. This should be installed in 'c:\mozilla-build` for some reason.
https://ftp.mozilla.org/pub/mozilla.org/mozilla/libraries/win32/MozillaBuildSetup-Latest.exe
  Alternatively you could use the mingw32 stuff that comes with git, and
install the autoheader/autoconf/automake/whatever stuff manually.

2. Start bash, this also does the vsvarsall.bat stuff and sets all the
paths and almost all environment settings.

```
c:\mozilla-build\start-shell-msvc2015.bat
``

3. You also need 'libtool', but please install it in a better directory
then I did. I had to fiddle around.

```
ln -s "/c/Program\ Files/libtool/bin/libtool" /bin/libtool
ln -s "/c/Program\ Files/libtool/bin/libtoolize" /bin/libtoolize
cp /c/Program\ Files/libtool/share/aclocal/*.m4 /usr/share/aclocal

```
4. Add 'AC_PROG_RANLIB' to 'configure.ac'

5. Then you can compile from the command line

```
export LD=link
./autogen.sh
./configure
make
# Several warnings and some errors will fly by.
```

6. Optional:

6a. If you want to work from inside msvc's gui, you should add 'C:
\mozilla-build\msys\bin` to your PATH environment.

6a. When you import a project from existing code, you need to set
Debug/Release settings:

```
Build command line: make
Rebuild all command line: bash autogen.sh;bash ./configure;make
Clean command line: make clean
Include search path: aapl src/gen src/include/colm
$(NMakeIncludeSearchPath)
```

There is some work to do to get this completely on msvc.
I hope that these notes are useful for somebody to jump in.

I'd like to work on this as well, but my schedule is rather full the
upcoming weeks. But please keep me informed.

Peter Reijnders
On Tue, 2017-03-21 at 15:04 +0800, Adrian Thurston wrote:
> Last I heard it compiles with Cygwin. Not sure about VS. Josef Goettgens 
> used to maintain a VS build for ragel but he stopped due to Cygwin being 
> sufficient. Email me privately for his contact.
> 
> On 2017-03-21 14:51, Бомбин Валентин wrote:
> > How i can build colm on windows (with Visual studio 2015) ?
> > 
> > _______________________________________________
> > colm mailing list
> > colm at colm.net
> > http://www.colm.net/cgi-bin/mailman/listinfo/colm
> 
> _______________________________________________
> colm mailing list
> colm at colm.net
> http://www.colm.net/cgi-bin/mailman/listinfo/colm






More information about the colm-users mailing list