<p>I cannot seem to compile mod_dontdothat on Windows. Has anybody managed to achieve this?</p>

<p>Edit:</p>

<p>I've tried compiling the file according to the readme on the site and I've tried to add extra libs to reduce the link errors. Ive got the following installed:</p>

<ol>
<li>Apache 2.2.9</li>
<li>Visual Studio 2008</li>
<li>ActivePerl</li>
<li>apxs-win32 from ApacheLounge</li>
<li>Subversion libs and headers</li>
</ol>

<p>I run the following command line:</p>

<pre>
C:\Program Files\Apache Software Foundation\Apache2.2\bin>apxs -c -I ..\include\
svn_config.h -L ..\lib -L C:\Progra~1\Micros~1.0\VC\lib -l apr-1.lib -l aprutil-
1.lib -l svn_subr-1.lib -l libapr-1.lib -l libaprutil-1.lib -l libhttpd.lib -l l
ibsvn_subr-1.lib -l mod_dav.lib mod_dontdothat.c
</pre>

<p>Then I get the following errors:</p>

<pre>
cl  /nologo /MD /W3 /O2 /D WIN32 /D _WINDOWS /D NDEBUG    -I"C:\PROGRA~1\APACHE~
1\Apache2.2\include"  /I"..\include\svn_config.h"  /c /Fomod_dontdothat.lo mod_d
ontdothat.c
mod_dontdothat.c
link kernel32.lib /nologo /subsystem:windows /dll /machine:I386 /libpath:"C:\PRO
GRA~1\APACHE~1\Apache2.2\lib" /out:mod_dontdothat.so  /libpath:"..\lib"  /libpat
h:"C:\Progra~1\Micros~1.0\VC\lib"  apr-1.lib aprutil-1.lib svn_subr-1.lib libapr
-1.lib libaprutil-1.lib libhttpd.lib libsvn_subr-1.lib mod_dav.lib   mod_dontdot
hat.lo
   Creating library mod_dontdothat.lib and object mod_dontdothat.exp
mod_dontdothat.lo : error LNK2019: unresolved external symbol _dav_svn_split_uri
@32 referenced in function _is_this_legal
svn_subr-1.lib(io.obj) : error LNK2001: unresolved external symbol __imp__libint
l_dgettext
svn_subr-1.lib(subst.obj) : error LNK2001: unresolved external symbol __imp__lib
intl_dgettext
svn_subr-1.lib(config_auth.obj) : error LNK2001: unresolved external symbol __im
p__libintl_dgettext
svn_subr-1.lib(time.obj) : error LNK2001: unresolved external symbol __imp__libi
ntl_dgettext
svn_subr-1.lib(nls.obj) : error LNK2001: unresolved external symbol __imp__libin
tl_dgettext
svn_subr-1.lib(dso.obj) : error LNK2001: unresolved external symbol __imp__libin
tl_dgettext
svn_subr-1.lib(path.obj) : error LNK2001: unresolved external symbol __imp__libi
ntl_dgettext
svn_subr-1.lib(prompt.obj) : error LNK2001: unresolved external symbol __imp__li
bintl_dgettext
svn_subr-1.lib(error.obj) : error LNK2019: unresolved external symbol __imp__lib
intl_dgettext referenced in function _print_error
svn_subr-1.lib(config.obj) : error LNK2001: unresolved external symbol __imp__li
bintl_dgettext
svn_subr-1.lib(utf.obj) : error LNK2001: unresolved external symbol __imp__libin
tl_dgettext
svn_subr-1.lib(cmdline.obj) : error LNK2001: unresolved external symbol __imp__l
ibintl_dgettext
svn_subr-1.lib(utf.obj) : error LNK2019: unresolved external symbol __imp__libin
tl_sprintf referenced in function _fuzzy_escape
svn_subr-1.lib(path.obj) : error LNK2001: unresolved external symbol __imp__libi
ntl_sprintf
svn_subr-1.lib(cmdline.obj) : error LNK2019: unresolved external symbol __imp__l
ibintl_fprintf referenced in function _svn_cmdline_init
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp
__SHGetFolderPathA@20 referenced in function _svn_config__win_config_path
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp
__SHGetFolderPathW@20 referenced in function _svn_config__win_config_path
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp
__RegCloseKey@4 referenced in function _svn_config__parse_registry
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp
__RegEnumKeyExA@32 referenced in function _svn_config__parse_registry
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp
__RegOpenKeyExA@20 referenced in function _svn_config__parse_registry
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp
__RegQueryValueExA@24 referenced in function _parse_section
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp
__RegEnumValueA@32 referenced in function _parse_section
svn_subr-1.lib(win32_xlate.obj) : error LNK2019: unresolved external symbol __im
p__CoUninitialize@0 referenced in function _svn_subr__win32_xlate_open
svn_subr-1.lib(win32_xlate.obj) : error LNK2019: unresolved external symbol __im
p__CoInitializeEx@8 referenced in function _svn_subr__win32_xlate_open
svn_subr-1.lib(win32_xlate.obj) : error LNK2019: unresolved external symbol __im
p__CoCreateInstance@20 referenced in function _get_page_id_from_name
svn_subr-1.lib(nls.obj) : error LNK2019: unresolved external symbol __imp__libin
tl_bindtextdomain referenced in function _svn_nls_init
svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _inflate
referenced in function _read_handler_gz
svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _inflateI
nit_ referenced in function _read_handler_gz
svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _deflate
referenced in function _write_handler_gz
svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _deflateI
nit_ referenced in function _write_handler_gz
svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _deflateE
nd referenced in function _close_handler_gz
svn_subr-1.lib(stream.obj) : error LNK2019: unresolved external symbol _inflateE
nd referenced in function _close_handler_gz
mod_dontdothat.so : fatal error LNK1120: 21 unresolved externals
apxs:Error: Command failed with rc=6291456
.
</pre>

<p>I'm not too much of a C guru, so any help in finding these unresolved external symbols will be much appreciated!</p>

[{'answer_id': 77964, 'author': 'Jason Dagit', 'author_id': 5113, 'author_profile': 'https://Stackoverflow.com/users/5113', 'pm_score': 1, 'selected': False, 'text': "<p>Thanks for revising the question.</p>\n\n<p>It looks like a definite linker issue.  I see that the first undefined symbol is related to webdav.  Are you sure you have that library in the right place?  I see you give a nice long path with lots of svn libs, maybe it's possible you overlooked just one?</p>\n"}, {'answer_id': 482896, 'author': 'agnul', 'author_id': 6069, 'author_profile': 'https://Stackoverflow.com/users/6069', 'pm_score': 2, 'selected': False, 'text': "<p>Googling around I've got </p>\n\n<ul>\n<li><code>mod_dav_svn.lib</code> for <code>_dav_svn_split_uri</code></li>\n<li><code>intl3_svn.lib</code> for all things <code>_libintl</code></li>\n<li><code>shell32.lib</code> for SHGetFolderPath</li>\n<li><code>advapi32.lib</code> for <code>Reg</code>istry stuff</li>\n<li><code>ole32.lib</code> for <code>CoInitialize</code> and it's ilk</li>\n<li><code>inflate</code> and <code>deflate</code> smell like <code>zlib1.lib</code> or something like that</li>\n</ul>\n\n<p>Hope that helps.</p>\n"}, {'answer_id': 499837, 'author': 'Eduard Wirch', 'author_id': 17428, 'author_profile': 'https://Stackoverflow.com/users/17428', 'pm_score': 4, 'selected': True, 'text': '<p>I managed to compile the module. Prerequisites:</p>\n\n<ul>\n<li>Apache 2.2.11</li>\n<li><a href="http://www.apachelounge.com/download/apxs_win32.zip" rel="noreferrer">apxs-win32</a> from www.apachelounge.com</li>\n<li>Visual Studio 2005</li>\n<li><a href="http://www.activestate.com/activeperl/" rel="noreferrer">Active Perl 5.8.8</a> (you need perl for apxs-win32 installation)</li>\n</ul>\n\n<p>Here is a step-by-step guide.\nDownload these packages:</p>\n\n<ul>\n<li><a href="http://subversion.tigris.org/files/documents/15/44595/svn-win32-1.5.5_dev.zip" rel="noreferrer">http://subversion.tigris.org/files/documents/15/44595/svn-win32-1.5.5_dev.zip</a> (we need the libraries and header files from this package)</li>\n<li><a href="http://subversion.tigris.org/downloads/subversion-1.5.5.zip" rel="noreferrer">http://subversion.tigris.org/downloads/subversion-1.5.5.zip</a> (we will be using the <code>mod_dav_svn</code> sources to compile a static lib)</li>\n</ul>\n\n<p>Unpack the dev package to <code>c:\\temp\\svn</code> and the other package to <code>c:\\temp\\svn-src</code> and the <code>mod_dontdothat</code> files to <code>C:\\Temp\\dontdothat</code>.</p>\n\n<p>One of the dependencies of <code>mod_dontdothat</code> module is <code>mod_dav_svn</code> module. Unfortunately you\'ll find the <code>mod_dav_svn</code> binary only as a shared library (DLL). You cannot link against\na DLL. So the first step is to build a static <code>mod_dav_svn</code> library:</p>\n\n<pre><code>cd C:\\Temp\\svn-src\\subversion\\mod_dav_svn\napxs -c -I ..\\include  -L C:\\Temp\\svn\\lib -l libsvn_delta-1.lib -l libsvn_diff-1.lib -l libsvn_fs-1.lib -l libsvn_fs_base-1.lib -l libsvn_fs_fs-1.lib -l libsvn_fs_util-1.lib -l libsvn_repos-1.lib -l libsvn_subr-1.lib -l libapr-1.lib -l libaprutil-1.lib -l libhttpd.lib -l mod_dav.lib -l xml.lib  -n mod_dav_svn mod_dav_svn.c activity.c authz.c deadprops.c liveprops.c lock.c merge.c mirror.c repos.c util.c version.c reports\\dated-rev.c reports\\file-revs.c reports\\get-locations.c reports\\get-location-segments.c reports\\get-locks.c reports\\log.c reports\\mergeinfo.c reports\\replay.c reports\\update.c\n</code></pre>\n\n<p>The apxs call will print the commands it executes. The last command is a link call which builds the DLL. Copy it replace "link" by "lib", remove the "/dll" param, and change the "out" param file name to "<code>libmod_dav_svn.lib</code>". You should get something similar to: </p>\n\n<pre><code>lib kernel32.lib /nologo /subsystem:windows /machine:I386 /libpath:"C:\\PROGRA~1\\APACHE~1\\Apache2.2\\lib" /out:libmod_dav_svn.lib  /libpath:"C:\\Temp\\svn\\lib"  libsvn_delta-1.lib libsvn_diff-1.lib libsvn_fs-1.lib libsvn_fs_base-1.lib libsvn_fs_fs-1.lib libsvn_fs_util-1.lib libsvn_repos-1.lib libsvn_subr-1.lib libapr-1.lib libaprutil-1.lib libhttpd.lib mod_dav.lib xml.lib   reports\\update.lo reports\\replay.lo reports\\mergeinfo.lo reports\\log.lo reports\\get-locks.lo reports\\get-location-segments.lo reports\\get-locations.lo reports\\file-revs.lo reports\\dated-rev.lo version.lo util.lo repos.lo mirror.lo merge.lo lock.lo liveprops.lo deadprops.lo authz.lo activity.lo mod_dav_svn.lo\n</code></pre>\n\n<p>You will get some link warnings. You can ignore them. Copy the <code>libmod_dav_svn.lib</code> to the <code>mod_dontdothat</code> directory. Now start the compilation process for <code>mod_dontdothat</code>:</p>\n\n<pre><code>C:\\Temp\\dontdothat\napxs -c -I C:\\Temp\\svn\\include -L C:\\Temp\\svn\\lib -l libsvn_subr-1.lib -l libapr-1.lib -l libaprutil-1.lib -l libhttpd.lib -l mod_dav.lib -l xml.lib -l libmod_dav_svn.lib    mod_dontdothat.c\napxs -i -n dontdothat mod_dontdothat.so\n</code></pre>\n\n<p>This should do the trick.</p>\n'}]
['https://Stackoverflow.com/questions/74883', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2822/']