c - 如何在Windows下以可重复的批处理模式编译自创建的Apache模块?

标签 c apache-modules

如何在Windows下以可重复的批处理模式编译自己创建的Apache模块(不使用我必须先编译的工具)?

我有:

这是我所做的:

  • 尝试重新编译 aspx -> 陷入 perl 错误消息 -> 放弃了,因为学习 perl 对我来说似乎是一条无路可走的路
  • 发现,windows apache是​​通过Visual Studio编译的
  • 尝试运行:

[mypath]\cl -nologo -MD -W3 -O2 -c -DWIN32 -D_WINDOWS -DNDEBUG -I[includepath1] -I[includepath2] -I[includepath3] -I[includepath4] -I[includepath5] mod_example_1.c

从我放置 mod_example_1.c 的路径中,根据下面的帖子 2

https://www.apachelounge.com/viewtopic.php?t=5611

(因为括号字符串 [ ] 是我计算机上真实路径或路径+文件的占位符)

这给我返回了德语错误消息:

mod_example_1.c(13): error C2054: Nach "module" muss "(" folgen
mod_example_1.c(13): error C2085: "example_module": Nicht in der formalen Parameterliste enthalten
mod_example_1.c(13): error C2143: Syntaxfehler: Es fehlt ";" vor "="
mod_example_1.c(30): warning C4013: "ap_hook_handler" undefiniert; Annahme: extern mit Rückgabetyp int

含义:

mod_example_1.c(13): error C2054: "module" requires to be succeeded by "("
mod_example_1.c(13): error C2085: "example_module": Not part of the formal list of parameters
mod_example_1.c(13): error C2143: Syntaxfehler: ";" is missing, before "="
mod_example_1.c(30): warning C4013: "ap_hook_handler" undefined; assumption: external with return type int

我认为,cl 中缺少解析术语“模块”的能力表明 cl 不能用于编译 apache-webserver-modules。但是为什么其他论坛的那个人会这样写呢?我错过了什么?

最佳答案

mod_perl 提供了一个奇怪的 apxs-for-windows:

http://www.apache.org/dist/perl/win32-bin/

关于c - 如何在Windows下以可重复的批处理模式编译自创建的Apache模块?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49372101/

相关文章:

c - 错误 sliceShiftLeft() 函数

c - Apache 服务器中的全局变量

java - webobjects 中的进程间通信(jvm、wotaskd、apache 模块)

c - Ubuntu,如何在 C 中链接 .exp 文件?

c - 如何在 Autoconf/Automake 项目中拥有 apache 模块和依赖的共享库

c++ - 位对齐 访问任意位长度字节对齐缓冲区

c - 如何用 C 中给定整数的数字填充数组?

c - 监听 sysfs 电池事件

c - 识别有效算术表达式以及识别有效标识符和运算符的 Lex 程序

apache - 在apache模块之间共享数据