You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Andreas Pakulat <ap...@gmx.de> on 2007/05/21 20:26:06 UTC

Problem using apr with mingw

Hi,

after a long journey and with the help of a kind soul I found that apr.h
contains an error which makes apr unusable with mingw. The problem is
line #59 in apr.h.in, that line redefines __attribute__(__x) to nothing,
however mingw uses __attribute__(__stdcall) when declaring a function
with __stdcall. This creates a problem when trying to link with the apr
library, because the import library contains the wrong symbols, in
particular it has _apr_foo and __im__?apr_foo@@...

Removing that define one can create a proper import library for apr from
the MSVC dll and the .def file by following the instructions found on
http://www.mingw.org/MinGWiki/index.php/MSVC-MinGW-DLL

So please remove this define from the apr code for the next release (or
should I rather file a bugreport?)

Andreas

-- 
Never give an inch!