Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem with IdHTTPServer in Lazarus
#5
Sorry, I forgot to add the code where it actually goes wrong.
And that is indeed at:
IdHTTPServer1.OnCommandGet := TDebugLogEventHandlers.IdHTTPServer1CommandGet;
IdHTTPServer1.OnException := TDebugLogEventHandlers.IdHTTPServer1Exception;

I already did try:
IdHTTPServer1.OnCommandGet := @TDebugLogEventHandlers.IdHTTPServer1CommandGet;
IdHTTPServer1.OnException := @TDebugLogEventHandlers.IdHTTPServer1Exception;

But now I got:
Error: Incompatible types: got "<class method type of procedure(TIdContext;TIdHTTPRequestInfo;TIdHTTPResponseInfo) of object;StdCall>" expected "<procedure variable type of procedure(TIdContext;TIdHTTPRequestInfo;TIdHTTPResponseInfo) of object;StdCall>"

So I compile for Linux, Raspberry Pi.
Yes, in "objfpc mode"

I got the compiling fixed by doing this:

var
DebugLogEventHandlers: TDebugLogEventHandlers;

IdHTTPServer1.OnCommandGet := @DebugLogEventHandlers.IdHTTPServer1CommandGet;

That fixed the compiling error.
But now I have major issues with the actual compiling of Indy10.
I will start a new post for this....
---
Bart Kindt
CEO and Developer
SARTrack Limited
New Zealand
www.sartrack.nz
Reply


Messages In This Thread
RE: Problem with IdHTTPServer in Lazarus - by BartKindt - 10-07-2021, 03:00 AM

Forum Jump:


Users browsing this thread: 1 Guest(s)