2008-09-16 6 views
2

Je n'arrive pas à compiler mod_dontdothat sous Windows. Est-ce que quelqu'un a réussi à atteindre cet objectif?Comment compiler mod_dontdothat sur Windows

Edit:

J'ai essayé de compiler le fichier selon le readme sur le site et j'ai essayé d'ajouter libs supplémentaires pour réduire les erreurs de liaison. Ive a installé les éléments suivants:

  1. Apache 2.2.9
  2. Visual Studio 2008
  3. ActivePerl
  4. apxs-win32 de ApacheLounge
  5. libs Subversion et les en-têtes

je lance le ligne de commande suivante:

 
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 

Puis-je obtenir les erreurs suivantes:

 
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 
[email protected] referenced in function _svn_config__win_config_path 
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp 
[email protected] referenced in function _svn_config__win_config_path 
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp 
[email protected] referenced in function _svn_config__parse_registry 
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp 
[email protected] referenced in function _svn_config__parse_registry 
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp 
[email protected] referenced in function _svn_config__parse_registry 
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp 
[email protected] referenced in function _parse_section 
svn_subr-1.lib(config_win.obj) : error LNK2019: unresolved external symbol __imp 
[email protected] referenced in function _parse_section 
svn_subr-1.lib(win32_xlate.obj) : error LNK2019: unresolved external symbol __im 
[email protected] referenced in function _svn_subr__win32_xlate_open 
svn_subr-1.lib(win32_xlate.obj) : error LNK2019: unresolved external symbol __im 
[email protected] referenced in function _svn_subr__win32_xlate_open 
svn_subr-1.lib(win32_xlate.obj) : error LNK2019: unresolved external symbol __im 
[email protected] 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 
. 

Je ne suis pas trop d'un gourou C, de sorte que toute aide à trouver ces symboles externes non résolus sera très appréciée!

+0

J'ai mis à jour ma réponse en fonction de vos questions. Le processus de compilation utilise les bibliothèques du paquetage svn, du paquetage apache et des bibliothèques standard du studio visuel. Il n'y a pas de version spécifique requise. –

Répondre

7

J'ai réussi à compiler le module. Pré-requis:

  • Apache 2.2.11
  • apxs-win32 de www.apachelounge.com
  • Visual Studio 2005
  • Active Perl 5.8.8 (vous avez besoin de Perl pour l'installation apxs-win32)

Voici un guide étape par étape. Télécharger ces paquets:

Déballez la dev paquet à c:\temp\svn et l'autre paquet à c:\temp\svn-src et les fichiers mod_dontdothat à C:\Temp\dontdothat. L'une des dépendances du module mod_dontdothat est mod_dav_svn. Malheureusement, vous trouverez le binaire mod_dav_svn uniquement en tant que bibliothèque partagée (DLL). Vous ne pouvez pas lier contre une DLL. La première étape consiste à construire une bibliothèque mod_dav_svn statique:

cd C:\Temp\svn-src\subversion\mod_dav_svn 
apxs -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 

L'appel apxs imprimera les commandes qu'il exécute. La dernière commande est un appel de lien qui construit la DLL. Copiez-le remplacer "link" par "lib", supprimez le paramètre "/ dll" et remplacez le nom du fichier "out" par "libmod_dav_svn.lib". Vous devriez obtenir quelque chose de similaire à:

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 

Vous recevrez des avertissements de liaison. Vous pouvez les ignorer. Copiez le libmod_dav_svn.lib dans le répertoire mod_dontdothat. Maintenant, commencez le processus de compilation pour mod_dontdothat:

C:\Temp\dontdothat 
apxs -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 
apxs -i -n dontdothat mod_dontdothat.so 

Cela devrait faire l'affaire.

+0

J'aime la liste étape par étape! Deux questions rapides: - Où avez-vous trouvé des apx? - Quelle version de lib utilisez-vous? Est-ce celui qui vient avec Visual Studio? – Trumpi

+0

Merci d'avoir ajouté tous les pré-requis! C'est vraiment une réponse de haute qualité! – Trumpi

1

Merci d'avoir révisé la question.

Cela ressemble à un problème de liaison certain. Je vois que le premier symbole indéfini est lié à webdav. Êtes-vous sûr d'avoir cette bibliothèque au bon endroit? Je vois que vous donnez un bon long chemin avec beaucoup de svn libs, peut-être est-il possible que vous en ayez oublié un seul?

+0

Yep - J'ai définitivement oublié certaines libs, mais lesquelles? – Trumpi

3

googler autour J'ai

  • mod_dav_svn.lib pour _dav_svn_split_uri
  • intl3_svn.lib pour tout ce qui _libintl
  • shell32.lib pour SHGetFolderPath
  • advapi32.lib pour Reg tère choses
  • ole32.lib pour CoInitialize et il est acabit
  • inflate et deflate odeur comme zlib1.lib ou quelque chose comme ça

espoir qui aide.

Questions connexes