fpc

Linux linker flag -lXi not finding lib when compiling Lazarus code

After I solved my first problem I got into another one. Looks like I'm missing some kind of library, making the linker complain that the -lXi is not working. I've included most of the Xorg devel packages, what more do I need? ...

Win32 Mutex not waiting.

I am creating an application that implements inter process communication. For this purpose I have set up a shared buffer, which seems to work fine. Now, I need a way for the data generating application (written in c++) to tell the data receiving application (written in freepascal/lazarus) when it should read the data. I was trying to...

Empty main form in GUI app converted from Delphi to Lazarus

I have converted my 2 GUI apps from Delphi to Lazarus. Both apps compile for Win32 platform, i386 and with GUI. Main form were converted using Lazarus tool and can be edited from IDE. But when I run such application main form does not appear, only blank form without any controls. I tried to debug this. It runs all code in initialization...

Is $apptype a Best Pratice Comment?

Hello, I just started using FPC to pratice more my old knowleadge of Pascal, but now for Linux, then I started seeing much this comment after the 'program' declaration: {$apptype console} But is this a best pratice comment or a type of declaration? Thanks. ...

GUI Only By Using FPC

Hello, I want to know how I can develop GUI applications(32 Bits) without using Delphi language(Object Pascsl), only by using FPC with Lazarus installed(Pascal). Thanks. ...

Can anyone point me to a AMF library in either Delphi or FreePascal?

I've done a simple search on the usual suspects(Google Code, Source Forge, SO) but did not find any hints of a project for AMF or Flash/Flex remoting. Has anyone stumbled on a project of this nature? ...

What was fpmake.pp used and is it still used?

I've used it once, not very well since I found hard to get by some decent examples/docs but it was a nice way of getting an environment done. Is it still a standard or as it been abandoned? Where could I find a beginner's how-to and also an advanced one so I can grow on usage? Thanks. ...

fpcmake and Makefile.fpc, where can I get some training?

I've never used any of these, but they are listed on the main Free Pascal site and I would really like to get my hands on: Beginners guide, to get me started Advanced guide, to help me grow All this in case it's still used/standard. Thanks ...

Problem with Splash Screen in Lazarus app

I am porting a Delphi application to FPC/Lazarus and this application shows info in splash screen. When unit has initialization section then this initialization section calls something like: Splash.Info(unit_name) This works in Delphi, but when I compiled this using FPC/Lazarus then I got exception when I create form with splash scre...

Problem with WM_COMMAND on Lazarus/FPC

I have form with MainMenu and I want to intercept when the user selects a command item from a menu. This works in Delphi: type TForm1 = class(TForm) ... // Memo and MainMenu created protected procedure WMCommand(var Info: TWMCommand); message WM_COMMAND; end; procedure TForm1.WMCommand(var Info: TWMCommand); begin if (...

Why is WPO(whole-program optimization) not doing any improvements in my program size? (FPC 2.4.0)

I use FPC 2.4.0 for WinXP(binary from the official page), also tryed with same version but compiled from source on my comp. I put something like this: I:\pascal\fpc-2.4.0.source\fpc-2.4.0\compiler\ppc386 -FWserver-1.wpo -OWsymbolliveness -CX -XX -Xs- -al -Os -oServer1.o Server I:\pascal\fpc-2.4.0.source\fpc-2.4.0\compiler\ppc386 -FWser...

Help me with a solution for what could be solutioned by virtual static fields... in FPC

Hi I'm doing an event manager in Freepascal Each event is an object type TEvent (=object), each kind of event must derive from this class. Events are differentiated by an integer identificator, assigned dynamically. The problem is that i want to retrieve the event id of an instance, and i can't do it well. All instances of a class(obj...

How to create makefile for Lazarus projects?

After doing a light search on the Lazarus site I've come to the conclusion that this question has been asked some times but I haven't found an answer, so I'll ask my SO peers. Is there a a way to create a Makefile to replicate the action of the Lazarus IDE when it compiles a project. If so I really don't mind if it's makefile.fpc or ju...

EBusError on assigning PageControl fpc/Lazaurs

I am trying to create dynamic TTabSheets for my program. Written in FPC/Lazarus being built for ARM/WinCE Everything works, including design time created tabsheets but the following code try Tab := TTabSheet.Create(PageControl1); logit('1'); Tab.PageControl := PageControl1; logit('2'); Tab.Caption := gname; except on E...

Active blogs about Lazarus and/or FPC

I'm getting really pissed with the whole direction that "Emborcadero" is taking and I'm really going to invest in FPC/Lazarus. Went to the Lazarus Documentation page and found the following blogs: Lazarus Development - Up to date Adventures of a Newbie - FPC Wiki page On the road with Lazarus/Free Pascal - Up to date Porting to Lazaru...

Where is the FPC/Lazarus community?

Calling all FreePascal and/or Lazarus big-shots!! Looking at the bulk of the questions tagged [FPC] or [Lazarus] we can find that it's Marco van de Voort that will answer most of them... But why? Where's the rest of the FPC and/or Lazarus community? There is a growing number of Delphi people around here, but I do miss some more i...

Execute code in the context of the main thread (Lazarus)

I have to execute some code in the context of the main thread. I am using Lazarus + FPC. I receive an event from a thread inside a DLL (shared library if on linux) and my callback function gets called. Note that this function is not a member of any class but a standalone traditional function with a "cdecl" directive attached. I have to ...

Where can I find the fpmake.pp framework source?

Hey guys, well Marco actually :) Where can I find the initial effort from the person who started fpmake.pp so I can pick up and/or continue. I'm about to get into a very complicated, in terms of building rules, project and I would really like to master the whole thing... OR bend it to my will :) ...

How can I compile a Lazarus Apache module to Apache 1.3, 2.0 and 2.2 selectively?

I've had a look at /etc/fpc.cfg and there is mention to some defines: FPCAPACHE_1_3 FPCAPACHE_2_0 Then in the fcl-web examples there is mention to: Apache1_3 The only one I've found is on the apr.pas on both these files: /usr/share/fpcsrc/2.4.0/packages/httpd20/src/apr/apr.pas /usr/share/fpcsrc/2.4.0/packages/httpd22/src/apr/ap...

Problem compiling a WebLaz project under Lazarus.

My specs: OS: Ubuntu 10.04 LTS amd64 fpc: 2.4.0 lazarus: 0.9.28 I'm trying to compile a WebLaz project just by creating one and then compiling. Somehow the compiler gets all lost when determinig witch httpd and fpapache Units to use. I've found similar problems in the forums: mod_helloworld.lpr Can't find fpapache Unit ... I NEED ...