我正在尝试安装一个CPAN包(Apache::MP3),它需要许多先决条件,包括perl和Apache上的mod_perl-2.0.11。根据前面的问题/答案,我可能需要visualstudio(以前都是用VS编译的)来编译mod\uperl模块。如果perl包含在XAMPP中,这就没有意义了。
但在这之前,我必须安装dmake(C:\xampp\C\bin)\dmake.exe)我从CPAN下载的,然后把它放在xampp目录下…\c\bin。。。我也下载了apxs.bat公司并将其放在xampp\apache\bin目录中。接下来,我需要一个gcc编译器根据前面的错误构建库/模块。
我现在正试着跟踪错误列表,因为我得到了他们,以成功的项目。原来的模块(Apache::MP3)并不重要,因为我只想确保Perl在XAMPP中工作。事实上,我可以将其用作cgi,但mod\uperl并不包含在安装中。
我遇到的问题是在尝试使用gcc和cygwin进行构建时遇到的问题(我把它放在我的路径中)。。。
\xampp\perl\lib\CORE/win32.h:106:10: fatal error: direct.h: No such file or directory
106 | #include <direct.h>
| ^~~~~~~~~~
compilation terminated.
dmake: Error code 129, while making 'mod_perl.lo'
dmake.exe: Error code 255, while making 'modperl_lib'
然后使用C:\MinGW\bin,我得到了这个错误消息。。。
C:\xampp\apache\include/http_log.h:37:10: fatal error: syslog.h: No such file or directory
37 | #include <syslog.h>
| ^~~~~~~~~~
compilation terminated. dmake: Error code 129, while making 'mod_perl.lo'
dmake.exe: Error code 255, while making 'modperl_lib'
此错误与编译器有关,也与访问与windows有关的内置头文件有关。我尝试将库目录添加到路径(重新启动命令提示符)同样,也没有效果。接下来我要做的就是打开生成文件.PL并附加参数告诉gcc在哪里可以找到自己的头文件。安装每个组件并获得VS编译器的副本会更好吗?