构建 mod_helloworld.lpr

发布于 2024-09-28 05:25:17 字数 1521 浏览 14 评论 0原文

我正在尝试构建 mod_helloworld.lpr 的 apache 示例,C:\lazarus\components\fpweb\demo\helloworld\apache

拉撒路 0.9.29
FPC版本2.4.3 SVN 27129
i386-win32

$(LazarusDir)\fpc\2.4.3\source\packages\fcl-web\src\ 添加到其他单元文件(-Fu)后,它会编译,但是当我构建时/link 我收到错误,

mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterCustomImageList
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterMenuItem
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterMenu
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterMainMenu
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterPopupMenu
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterDragImageList
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterWinControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterGraphicControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterCustomControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterScrollingWinControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterScrollBox
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterCustomFrame
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterCustomForm
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterHintWindow
mod_helloworld.lpr(38,1) Fatal: There were 15 errors compiling module, stopping

我猜测它试图添加拼箱或其他东西,但实际上我不知道。

Im trying to build the apache example of the mod_helloworld.lpr, C:\lazarus\components\fpweb\demo\helloworld\apache

Lazarus 0.9.29
FPC Verion 2.4.3 SVN 27129
i386-win32

After Adding $(LazarusDir)\fpc\2.4.3\source\packages\fcl-web\src\ to the Other Unit Files (-Fu) it will compile, but when i build/link i get the errors

mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterCustomImageList
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterMenuItem
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterMenu
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterMainMenu
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterPopupMenu
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterDragImageList
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterWinControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterGraphicControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterCustomControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterScrollingWinControl
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterScrollBox
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterCustomFrame
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterCustomForm
mod_helloworld.lpr(38,1) Error: Undefined symbol: WSRegisterHintWindow
mod_helloworld.lpr(38,1) Fatal: There were 15 errors compiling module, stopping

im gussing its trying to add the lcl or something, but really i have no idea.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

止于盛夏 2024-10-05 05:25:17

想通了......它认为

在将Interfaces添加到uses Cause之后,我可以编译mod_helloworld。

我不知道它是从哪里来的,但我记得这样做是为了获得 CGI 协同编译。

但现在的问题是,我的apache安装不会除了.dll

LoadModule mod_helloworld "C:\lazarus\components\fpweb\demo\helloworld\apache\mod_helloworld.dll"

httpd.exe:第 63 行存在语法错误
C:/Program Files/Apache 软件
基金会/Apache2.2/conf/httpd.conf:
无法加载
C:/lazarus/components/fpweb/demo/hellow
orld/apache/mod_helloworld.dll 进入
服务器:指定的模块无法
被发现。

但我可能很快就会将此作为一个新问题发布

Figured it out... it think

after adding Interfaces to the uses cause, i can get the mod_helloworld to compile.

I dont know where that came from, but i remember doing it to get a CGI co compile.

but the problem is now, my apache install will not except the .dll

LoadModule mod_helloworld "C:\lazarus\components\fpweb\demo\helloworld\apache\mod_helloworld.dll"

httpd.exe: Syntax error on line 63 of
C:/Program Files/Apache Software
Foundatio n/Apache2.2/conf/httpd.conf:
Cannot load
C:/lazarus/components/fpweb/demo/hellow
orld/apache/mod_helloworld.dll into
server: The specified module could not
be found.

but ill prob post this as a new question soon

躲猫猫 2024-10-05 05:25:17

我在 Ubuntu 10.04 LTS amd64 下也遇到了同样的问题。

看一下 在 Lazarus 下编译 WebLaz 项目时遇到的问题。

这也可能有帮助:如何有选择地将 Lazarus Apache 模块编译为 Apache 1.3、2.0 和 2.2?

我选择了“删除不必要的文件夹”选项并强制 fpc.cfg 始终指向 httpd22。

我知道这不是最好的,所以我会给出更详细的解释。

假设 FPSRC 包含 FPC 源文件路径,FPCUNITS 包含预编译单元,FPCCFG 包含 fpc.cfg 文件的路径。

如果您查看 FPCCFG,您会发现一个块决定 Apache 的版本:

#IFDEF FPCAPACHE_1_3
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/httpd13/
#ELSE
#IFDEF FPCAPACHE_2_0
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/httpd20/
#ELSE
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/httpd22/
#ENDIF
#ENDIF

按照建议 在这里您可以将这些指令放在 FPCCFG 的顶部,以便编译器可以到达正确的文件夹。

这样就可以解决 FPC 在需要编译源代码时可以在哪里找到源代码的问题。

现在我们有另一个问题:它没有链接到正确的 ppu。

如果您查看 FPCUNITS,您会发现 3 个文件夹:httpd13、httpd20 和 httpd22。

现在,编译器在寻找正确的文件夹/单元组合时,将首先在 httpd13 或 httpd20 下找到它。如果您想要 Apache 2.2 模块,那么这并不好,并且会搞砸所有链接。

我没有针对这一困境的“智能”解决方案,即涉及条件指令的解决方案,所以我只是删除了我不想要的 2 个文件夹(在正确备份之后,以防万一我需要针对其他 Apache 版本进行编译/链接) )。就我而言,httpd13 和 httpd20。

我还必须将“-fPIC”添加到我的编译器选项中。这是在来自编译器或链接器的错误消息之一中建议的,但这是我真正不知道它是全局的还是只是我的 64 位设置的唯一一件事。

我希望这能在 Windows 下工作。

编辑:我正在构建一个多个应用程序项目,并将使用 fpmake.pp 来编译它。一旦我解决了 fpmake.pp 中的所有问题,我也会将其发布,以便人们可以避免其中一些问题。

I've had the same exact problem under Ubuntu 10.04 LTS amd64.

Have a look at Problem compiling a WebLaz project under Lazarus.

This one might also help: How can I compile a Lazarus Apache module to Apache 1.3, 2.0 and 2.2 selectively?

I took the "delete unnecessary folders" option and forcing fpc.cfg to always point to httpd22.

I know it's not the best so I'll give a more detailed explanation.

Let's assume that FPSRC contains the FPC source files path, FPCUNITS contains the pre-compiled units and FPCCFG contains the path to the fpc.cfg file.

If you have a look at FPCCFG you'll find a block that decides what version of Apache:

#IFDEF FPCAPACHE_1_3
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/httpd13/
#ELSE
#IFDEF FPCAPACHE_2_0
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/httpd20/
#ELSE
-Fu/usr/lib/fpc/$fpcversion/units/$fpctarget/httpd22/
#ENDIF
#ENDIF

As per suggested here you can put those directives at the top of FPCCFG so the compiler can reach the right folders.

So that takes care of where FPC can find the sources if it needs to compile them.

Now we have another problem: It's doesn't link against the right ppu.

If you have a look at FPCUNITS you'll find 3 folders: httpd13, httpd20 and httpd22.

Now the compiler, while looking for the correct folder/unit combination, will find it first under httpd13, or httpd20. This is no good if you want an Apache 2.2 module and will botch up all the linking.

I don't have a "smart" solution for this dilemma, one that involves conditional directives, so I just deleted the 2 folders I don't want(After a proper backup just in case I need to compile/link against other Apache versions). In my case httpd13 and httpd20.

I've also had to add the "-fPIC" to my compiler options. It was suggested in one of the error messages from either the compiler or the linker, but this is the only thing I REALLY DON'T KNOW if it's a global thing or just my 64bit setup.

I hope this works under Windows though.

EDIT: I'm building a multiple app project and will be using fpmake.pp to compile it all. Once I get all the kinks out of the fpmake.pp I'll also post it so one could avoid some of these issues.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文