Building APR with GCC on Windows

Steve Hay <[email protected]> Sun, 10 Aug 2025 11:26:03 +0100
Newsgroups gmane.comp.apache.apr.devel
Message-ID <CADED=K5eqr4XJ_QaB3H7W4ou_Ea_YOjJiWHgKZdTqOsRdk0xeQ@mail.gmail.com>
Is it possible to build APR with GCC on Windows?

I am using the latest GCC (15.1.0) with MinGW-w64 (13.0.0 UCRT) from
https://winlibs.com/, specifically:
https://github.com/brechtsanders/winlibs_mingw/releases/download/15.1.0posix-13.0.0-ucrt-r4/winlibs-x86_64-posix-seh-gcc-15.1.0-mingw-w64ucrt-13.0.0-r4.zip

With the latest CMake (4.1.0) I have configured the recommended APR
(1.7.6) as follows:

cmake -B . -G "MinGW Makefiles" -DCMAKE_POLICY_VERSION_MINIMUM=3.10
-DCMAKE_INSTALL_PREFIX=C:\apr -DCMAKE_BUILD_TYPE=Release
-DAPR_BUILD_TESTAPR=OFF -DAPR_INSTALL_PRIVATE_H=ON -DINSTALL_PDB=OFF

and then attempted to build APR with the mingw32-make included in the
WinLibs compiler suite, but I get masses of errors and warnings
(attached as out.txt, since it's too much to include inline).

I get the same result whether I use the UNIX source (apr-1.7.6.tar.gz)
or the Win32 source (apr-1.7.6-win32-src.zip). I also get much the
same result (attached as out2.txt) if I try the latest SVN sources for
the 2.0 development version.

Is this expected? I was hoping to build Apache httpd with GCC for use
with a Perl built with the same GCC, but things have not got off to a
good start here.
out.txt (text/plain, 190 KB) - not displayed
out2.txt (text/plain, 190.3 KB) - not displayed