0

I'm trying to compile htmlcxx lib using MinGW / MSYS and I'm having trouble with this. First, I got this error:

make : The term 'make' is not recognized as the name of a cmdlet, function, script file, or
operable program.

After I figured this out by editing PATH, I started to get same error about "./configure" command

./configure : The term './configure' is not recognized as the name of a cmdlet, function,
script file, or operable program.

What's the source of this issue?

max paint
  • 49
  • 6

2 Answers2

1

First of all, I really recommend using MSYS2 (https://www.msys2.org/) as it's much more up to date and faster than MSYS, and MinGW-w64 as it's more up to date than MinGW and it supports both 32-bit and 64-bit Windows.

Your errors indicate you are running those commands from PowerShell, not from the MSYS (bash) shell. Run the same commands from the MSYS shell.

In fact you can leave out autoreconf -i as there is already a configure script.

After trying this myself I found the MSYS2/MinGW-w64 build needed a few tricks in order to build (both the static and shared libraries):

INSTALLPREFIX=/usr/local
./configure --prefix=$INSTALLPREFIX &&
sed -i.bak -e "s/\(allow_undefined=\)yes/\1no/" libtool &&
make install-strip am_libcss_parser_pp_la_OBJECTS="parser_pp.lo parser.lo css_syntax.lo css_lex.lo" LIBS="-Wl,--as-needed -liconv" &&
echo Success

I have reported these MinGW-w64 build issues to htmlcxx here.

Brecht Sanders
  • 6,215
  • 1
  • 16
  • 40
0

So, here's instruction what I did to make this work properly:

  • First you install MinGW
  • then go to C:\MinGW\bin and rename mingw-make.exe to make.exe (maybe this step isn't necessary, but that's what I did)
  • then add C:\MinGW\bin and C:\MinGW\msys\1.0\bin to your PATH (environmental variables)
  • then open folder where you unpacked htmlcxx and edit Configure.ac file - after
AC_CHECK_LIB(iconv, iconv_open)

add

AC_CHECK_LIB(iconv, libiconv_open)
  • then open PowerShell, type sh command to enter shell
  • and only there you should cd to your folder with htmlcxx and use this commands:
autoreconf -i 
./configure 
make 
make install
max paint
  • 49
  • 6