Recent

Author Topic: mod_helloworld.lpr(9,10) Fatal: Can't find unit fpapache used by mod_helloworld  (Read 9713 times)

garlar27

  • Hero Member
  • *****
  • Posts: 652
It's weird, compiler can't find unit and editor can...

Any Ideas why it hapens?

Lazarus 0.9.28.2-0 Beta FPC 2.2.4 Ubuntu 9.04

garlar27

  • Hero Member
  • *****
  • Posts: 652
I've noticed that installed fpWeb components are located in "/usr/lib/lazarus/0.9.28.2/components/fpweb/" beside examples it doesn't contains much.

and the source that editor opens is in "/usr/share/fpcsrc/2.2.4/packages/fcl-web/src/fpapache.pp"

I've made a wrong component install?

fabienwang

  • Sr. Member
  • ****
  • Posts: 449
  • Lazarus is the best
    • My blog
there is weblaz.lpk and lazwebextra.lpk located in /usr/lib/lazarus/0.9.28.2/components/fpweb/"

Did you install them using menu Packages->Install/Uninstall Packages?
it will recompile lazarus iirc
I'm using Arch Linux.
Known for: CPickSniff, OpenGrabby
Contributed to: LazPaint

garlar27

  • Hero Member
  • *****
  • Posts: 652
I've installed WebLaz from the "Installed Packages" dialog (see picture) and I don't know what Lazarus did....

I will try to install the lazwebextra.lpk

garlar27

  • Hero Member
  • *****
  • Posts: 652
By the way... I can't find the "lazwebextra.lpk" file in the location you said  :-[

garlar27

  • Hero Member
  • *****
  • Posts: 652
HELP PLEASE!!!

There must be something terribly wrong with my lazarus install!!
 :o :o :o :o :o
I can't compile a simple helloworld!!!

I've read in other posts that people who had the same problem as me, they had copied the source code inside project source folder and they could compile the helloworld. I have tryed the same and I still have probles to compile, but now the compiler can't find a type declared inside http_config.inc used by httpd in line 84
 %)
I don't know what's wrong!!

iorek

  • New member
  • *
  • Posts: 9
It's weird, compiler can't find unit and editor can...

Any Ideas why it hapens?

Lazarus 0.9.28.2-0 Beta FPC 2.2.4 Ubuntu 9.04

README.txt in fpweb directory says, that it should work with fpc 2.4.*, I don't know if this will work with your setup. I have later snapshot and fpc 2.4.0 on Mandriva.

This unit comes with fpc-src package. It is in /usr/share/fpcsrc/packages/fcl-web/src (well there it is on Mandriva, but I don't thin it is much different on Ubuntu). You need to add this path to Other units paths in Project options /Compiler options/ Paths. You must have write permissions on this directory.

PS: This thread might fit better in  Networkin section ...
LP, Tomaž
« Last Edit: September 16, 2010, 08:59:14 pm by iorek »

garlar27

  • Hero Member
  • *****
  • Posts: 652
This unit comes with fpc-src package. It is in /usr/share/fpcsrc/packages/fcl-web/src (well there it is on Mandriva, but I don't thin it is much different on Ubuntu). ...

Tomaž, as you said ubuntu it's not different: "/usr/share/fpcsrc/2.2.4/packages/fcl-web/src/fpapache.pp".

.... You need to add this path to Other units paths in Project options /Compiler options/ Paths. You must have write permissions on this directory.

Yes, I've tried that because I don't like the idea of copying source files and then I had a different error:
Quote
/usr/share/fpcsrc/2.2.4/packages/fcl-web/src/fpapache.pp(143,40) Error: Identifier not found "ap_hook_handler_t"
now I do Ctrl+Click "ap_hook_handler_t" and the editor goes to "/usr/share/fpcsrc/2.2.4/packages/httpd20/src/http_config.inc" at line 1131 where is the following code:
Code: [Select]
type
  ap_HOOK_handler_t = function(r: Prequest_rec): Integer; cdecl; // Line 1131  ***
This file is included in "/usr/share/fpcsrc/2.2.4/packages/httpd20/src/httpd.pas" in line 84 as shown here:
Code: [Select]
{$include ap_provider.inc}
{$include util_cfgtree.inc}

{$include httpd.inc}
{$include http_config.inc} // line 84 ****
{$include http_core.inc}
{$include http_log.inc}
{$include http_main.inc}
{$include http_protocol.inc}
{$include http_request.inc}
{$include http_connection.inc}
{$include http_vhost.inc}

{$include util_script.inc}
{$include util_time.inc}
{$include util_md5.inc}
{$include ap_mpm.inc}

implementation
And "httpd.pas" is used by "fpapache.pp".

Changing permissions haven't done any difference.

PS: This thread might fit better in  Networkin section ...

I thought the same but I posted here because I think that part of my problem is in package install or any other LCL issue (I'm getting compile errors of a simple example that should at least compile without problem).

 

TinyPortal © 2005-2018