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

Closing a connection and re-opening with Synapse in Lazarus

I'm using the Synapse library with Lazarus and I'm trying to switch a TCPBlockSocket connection between two different IP addresses. I create the Socket connection with: mySocket:=TTCPBlockSocket.Create I then connect to the first IP address…
Fat Monk
  • 2,077
  • 1
  • 26
  • 59
0
votes
1 answer

Delphi: How to compare strings by their lexicographical order (dictionary order)?

The standards Delphi RTL string comparison routines compare strings by ASCII ordering. As far as I concern, lexicographic ordering is based only on the letters of the alphabet; it is the ordering system used in dictionaries. Is there a Delphi native…
Astaroth
  • 2,241
  • 18
  • 35
0
votes
1 answer

Invalid combination of opcode and operands FPC

I'm trying to implement a function StrPos in assembler. I have 64-bit processor and FPC. When I'm compiling this shows the following errors: function StrPos(Str1, Str2: PChar): LONGINT; assembler; asm PUSH DS CLD …
Mila
  • 3
  • 2
0
votes
1 answer

Exception raised when setting Text property of TEdit in custom component (Lazarus)

Using: Lazarus 1.2.0; Windows 32-bit application I have created a custom component derived from TCustomPanel and contains some TEdit controls. At runtime, when I try to set the Text property of an edit control in my component, I get a runtime…
Steve F
  • 1,527
  • 1
  • 29
  • 55
0
votes
0 answers

SIGSEGV on AttachCurrentThread in new thread

AttachCurrentThread crashes with # A fatal error has been detected by the Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00007f810fba15f5, pid=21079, tid=140192045909760 # # JRE version: Java(TM) SE Runtime Environment (7.0_45-b18) (build…
BeniBela
  • 16,412
  • 4
  • 45
  • 52
0
votes
1 answer

How to fix runtime error 201?

I compiled the program with -Criot -gl flags and instead of 1 I get a lot of results to my surpise (in fact, I was looking for fix a 216 error). The first is with the below code that's a simple hashing function. I have no idea how to fix…
The Mask
  • 17,007
  • 37
  • 111
  • 185
0
votes
2 answers

Changing 2D pointer in pascal

How can I write equivalent to this in pascal? void push(struct node **head, struct node **member) { (*head)->next = *member; (*member)->prev = *head; (*member)->next = NULL; *head = *member; } I've tried something like this: procedure…
The Mask
  • 17,007
  • 37
  • 111
  • 185
0
votes
0 answers

Replacement of 'Str2UnixSockAddr' which is marked as deprecated

I'm using the function 'Str2UnixSockAddr' from the sockets unit in Freepascal for programming unix-domain-sockets. But I ever get the warning that is marked as deprecated. What is the replacement for that function that is not deprecated?
Stefc
  • 73
  • 6
0
votes
1 answer

FPC TList Specialization not supported

I am using Lazarus 1.0.4 with FPC 2.6 I am trying to create a TList of an own class (I just use string here, because it is more easy), but when I try to use type TStringList = specialize TList; it says "Specialization is only supported for…
Pinguin895
  • 999
  • 2
  • 11
  • 28
0
votes
2 answers

convert string to set type

In my application I have many sets defined: eBlockTypes = (btNone,btUndefined,btStone, btYellowFlower, btWoodBrown...); sMinerals = set of eBlockTypes; var mineralsRare: sMinerals; mineralsPlants: sMinerals; mineralsAll: sMinerals; …
laggyluk
  • 195
  • 2
  • 14
0
votes
3 answers

Creating smallest DLL file

I have created a DLL file (library) with one assembler function. This file is 75kB size. How to make this file smaller? Like I suspect, there is an automatically included System unit. Can I exclude this unit from my dll file?
apocalypse
  • 5,764
  • 9
  • 47
  • 95
0
votes
1 answer

Match a Regular Expression by simple 2 cases:

I'm trying to use a Regex Pattern in FPC (Free Pascal) - more here: http://wiki.freepascal.org/IDE_regular_expressions HOWEVER! I can't determine how to match the first occurrence (if any) of a 3or4 lowercase (a-z) character strand. I'd then proceed…
0
votes
2 answers

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…
0
votes
1 answer

Crash in pthread_specific() on Mac OS X

I'm getting a crash in pthread_specific() on OS X Lion using a 32-bit server application written with FPC and Indy 10 on Mac OS X. I'm finding it very hard to track down the cause. The crash occurs because gs:[tlsindex] is not readable, but I have…
Frederik Slijkerman
  • 6,471
  • 28
  • 39
0
votes
1 answer

Virtual Keyboard Bug on iOS6 (using FPC)

I have a problem with the Virtual Keyboard which only occurs on iOS 6. I have a UITextField which I use to catch keyboard imput from the Virtual Keyboard, but on iOS 6 it only shows once, after the keyboard closes for the first time it is not show…
1 2 3
10
11