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
2
votes
1 answer

What happens in FreePascal if field F of Class C is assigned to pointer P after P is set to nil?

The goal is to add a list of edges to a graph using instances of TList. TList is a standard list class in FreePascal, with an iterator interface and other creature comforts. Here is my idea in FreePascal code: PROGRAM PassPointerToClass; TYPE …
2
votes
1 answer

How to enable Lazarus to compile to Android?

I did not used Lazarus for almost two years. I installed version 1.0.10 and found Android as an option for Target OS and I decided to test with ARM as the CPU family, all that in the Options window. But when I exit the Options window I receive a…
NaN
  • 8,596
  • 20
  • 79
  • 153
2
votes
1 answer

Free Pascal 2.6.2 error with TThread constructor

The Free Pascal 2.6.2 compiler (using Delphi mode) complained about program project16416258; {$mode Delphi} uses Classes; type TFPCTestThread = class(TThread) public constructor Create(CreateSuspended: Boolean); end; constructor…
mjn
  • 36,362
  • 28
  • 176
  • 378
2
votes
1 answer

How to create project file in Free Pascal IDE?

I'm started to learn Free Pascal and stick to the simple yet important question: is it possible to create project in console Free Pascal IDE? How could I compile two units into one program? I've searched over Internet, but all links leads to the…
shytikov
  • 9,155
  • 8
  • 56
  • 103
2
votes
0 answers

How to read a bundled file from an iOS app using Delphi/Freepascal

I have a *.txt file bundled in my iOS app and need to read its content. I already found this Objective-C code: NSString *myFilePath = [[NSBundle mainBundle] pathForResource:@"MyFile" ofType:@"txt"]; Is there a working…
Jan Windemuth
  • 486
  • 3
  • 13
1
vote
1 answer

Freepascal, Indy SVN trunk version, nothing received by PHP client when transfering XML, until removing encoding conversion

I have written a server daemon (Linux, Ubuntu) which communicates with PHP as frontend layer. Recently, i updated both FPC and the Indy library to its FPC 2.6.0 and Indy to the trunk version (before i was using the Tiburon branch). All compiled,…
Marius
  • 3,043
  • 1
  • 15
  • 24
1
vote
1 answer

Dealing with Unity's Global Menu and Overlay Scrollbars under Free Pascal/Lazarus

I've had some problems under the IDE that were fixed with unsettings and disabling Global menu and the Overlay Scrollbars. I've reported the problem in Lazarus' Mantis: #0021465, #0021467. There is also this bug report talking a bit more about it:…
Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
1
vote
4 answers

Notepad++ + fpc compiler

How to combine Free Pascal compiler and NP++ (or maybe other editor, Vim, Geany, ...)? i.e. I want something like IDE: compiling, running from NP++, list of errors\warnings. I tried…
Alex P.
  • 3,697
  • 9
  • 45
  • 110
1
vote
1 answer

GetUserName under MacOSX with Lazarus FPC

i'm right now porting an application which was made for Window using Lazarus to MacOSX. I've a few WinAPI calls which i need to recode to make it work under Mac. Now i need to find out the user name of the current mac account which is logged in the…
darkdog
  • 3,805
  • 7
  • 37
  • 47
1
vote
3 answers

Link Error: Undefined symbol: ___strtod

I am trying to static link lua into a FreePascal application. I have fixed all of the errors during the linking except this one. Undefined Symbol: __strtod All of the other Undefined Symbols I was able to link in via libkernel32.a, libuser32.a and…
Don Duvall
  • 839
  • 6
  • 10
1
vote
1 answer

Autoscroll on TRichView (lazarus)

Some hint to to make works a autoscroll in TRichView? I've try to use this: my_richview.Perform(EM_LINESCROLL, 0, my_richview.Lines.Count - 1); It doesn't work: unitmessage.pas(101,45) Error: Identifier not found "EM_LINESCROLL"
Junix
  • 195
  • 2
  • 13
1
vote
0 answers

Delphi/FPC Code no longer compiles under XCode after update to XE2 Update 2

I have written an iOS app using Delphi XE2 (Firemonkey) to call a webservice. The code has stopped compiling since I applied Delphi XE2 Update 2 - (Previously I was using update 1). I have also updated the XCode to 4.2 and iOS5, however I think that…
Peter
  • 1,065
  • 6
  • 18
1
vote
2 answers

Lazarus 0.9.30 trimmed menu entries

I'm using Lazarus 0.9.30 and in both the IDE and the sample applications the menu entries a trimmed: alt text http://www.freeimagehosting.net/uploads/94832ba880.png I can live with this in the IDE, but for the aplications is there something I can…
alexandrul
  • 12,856
  • 13
  • 72
  • 99
1
vote
1 answer

How to avoid WSRegister* on a Free Pascal .dll/.so

I finally had success compiling a "blank" Apache module, but now I've hit a rather annoying snag. I want to communicate with a MongoDB server and I opted for the only lib around for FreePascal/Lazarus, pebongo. Dependency for pebongo is…
Gustavo Carreno
  • 9,499
  • 13
  • 45
  • 76
1
vote
2 answers

Building mod_helloworld.lpr

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…
Christopher Chase
  • 2,840
  • 6
  • 36
  • 57