Questions tagged [fpc]

FPC (Free Pascal Compiler) is a 32/64-bit multi-architecture Object Pascal compiler with both Turbo Pascal, Apple Pascal and Delphi dialects.

FPC (Free Pascal Compiler) is a 16/32/64-bit multi-architecture Object Pascal compiler with both Turbo Pascal, Apple Pascal and Delphi dialects.

Free Pascal is the compiler core under the Lazarus RAD project, which provides a portable Delphi-like IDE and RAD. Lazarus has its own tag on Stackoverflow.

However Free Pascal is used directly for server/web/control apps too.

Free Pascal currently supports x86/x86_64, powerpc/powerpc64, sparc and assorted ARMs, and most popular OSes.

8086 (16-bit x86), m68k and Mips are in advanced stages of preparation in the development branch.

164 questions
1
vote
2 answers

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…
Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
1
vote
1 answer

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…
Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
1
vote
1 answer

try except versus try finally in Delphi

Many things have be mentioned for nested exception handling in Delphi or fpc. Something like this for example. My question, that maybe solves the need for nested try... blocks, is if there is an actual difference between the following 2 versions of…
Vassilis
  • 2,878
  • 1
  • 28
  • 43
1
vote
1 answer

Delphi: Which methods are supposed to be in RTTI?

I'd like to understand the principles of adding methods to RTTI (I mean the old one, which is supported by old Delphi versions (before Delphi 2010) or by FPC). As far as I know the RTTI is supposed to have information about published methods. But…
Int0h
  • 71
  • 5
1
vote
2 answers

FPC 3.0 and InterlockedCompareExchange

I installed Lazarus 1.6/FPC 3.0, 64 bits on Windows 10 (64 bits) and porting Delphi code containing InterlockedCompareExchangePointer function. FPC 3.0 does not include InterlockedCompareExchangePointer declaration; instead it "overloads"…
kludg
  • 27,213
  • 5
  • 67
  • 118
1
vote
1 answer

TListView event OnSelectItem holds the wrong TListItem instance?

The TListItem returned in OnSelectItem event of the TListView holds the previously selected item instead of the latest (current) one. Is It a bug? Tested in Linux Mint 17.2, Lazarus 1.4.4, FPC 2.6.4 Feed a TListView with some items…
Vassilis
  • 2,878
  • 1
  • 28
  • 43
1
vote
1 answer

TAsyncProcess doesn't start with parametrs

I want run phantonJS executable from TProcess wuth my JS and some parametrs for it. But TAsyncProcess ignore my command line params. PhandomJS docs says, that I must run my script in that order: phantomjs.exe [phantom opts] jsfile.js [jsfile…
AlexLL
  • 165
  • 1
  • 13
1
vote
1 answer

Motorola MC32N0 CodeTyphon Cross Compile. Application crash

I compile application with CodeTyphon for Motorola MC32N0 device (processor: Cortex A9 OMAP4430; OS: Windows CE 7.00). When I try launch application, it crashes on start with unspecific message: " An unhandled exception occurred at…
1
vote
0 answers

Can two different programs have complete access to single INI file at the same time?

I have two different programs that need to have complete access to a single INI file to read and write into at the same time. Is this possible? I am using fpc 2.6.2 and Lazarus 1.0.12.
ThN
  • 3,235
  • 3
  • 57
  • 115
1
vote
1 answer

Get Access violation when I run my pascal program, how to solve? (With free pascal)

This is PointClass.pas {$mode objfpc} // Directive to be used for defining classes {$m+} // Directive to be used for using constructor UNIT PointClass ; INTERFACE TYPE Point = CLASS(TObject) PRIVATE x : INTEGER ; y :…
Andymememe
  • 21
  • 5
1
vote
1 answer

fcl-json jsonConf: save json formatted?

I save file via jsonConf (TJsonConfig) and json file is of 1 long long line. (many keys are in it). How to save it formatted? Nicely like at web. Lazarus 1.4.2.
Prog1020
  • 4,530
  • 8
  • 31
  • 65
1
vote
1 answer

Lazarus: StringReplace ineffective when working with files (unicode issue)

I'm using Lazarus to build a simple app that builds Outlook signatures based on a template. The idea is to extract the template (a ZIP file), and replace variables within the files it contains. For example, I may want to replace {fullname} with the…
Mike Rockétt
  • 8,947
  • 4
  • 45
  • 81
1
vote
1 answer

Generating Position Set Points for Trapezoidal Motion Profile

I'm working on a prototype for a motion controller which will accelerate a motor to a maximum velocity, coast at the maximum velocity and then commence deceleration at the correct position for the motor to stop at the target position. The…
M-R
  • 411
  • 2
  • 6
  • 15
1
vote
1 answer

TZQuery on Typhon IDE Returns Only 6 Fields Where It Should Returns 8 Fields

I am working on Typhon IDE (v.5.1 and FPC v.2.7.1)and am creating user login function, utilizing PostgreSQL 9.3 as database and Zeos 7.2 as data connector. I have this following code: // ZQ: TZQuery; zq := ExecSQL('SELECT '+ …
1
vote
1 answer

Why am I'm getting an Error 207 (invalid floating point operation)/ How to get around it?

program cosseno; var fat1, fat2, n1, n2, cont1, cont2, s :real; begin s := 0.5; fat1 := 24; fat2 := 720; n1 := 1/fat1; n2 := 1/fat2; cont1 := 8; cont2 := 10; while (n1 - n2) > 0.000001 do begin fat1 := (cont1) * (cont1-1) *…