[fpc-pascal] Conversion between ordinals and pointers is not portable

2011-03-02 Thread Roland Turcan
Hello all, I have this code: TYPE PRDBRecord =^TRDBRecord; TRDBRecord =PACKED RECORD Content :ARRAY [0..65500] OF BYTE; END; VAR MOffset:INTEGER; p :PByteArray; FData :PRDBRecord; ... p := PByteArray (PtrUInt (@FData.Content[0]

[fpc-pascal] Assembling (pipe) /Users/{standard input}:2540:suffix or operands invalid for `cmovns'

2011-02-22 Thread Roland Turcan
Hello all, I was trying to compile my project with FPC rev16967 on Mac OS X 10.5. CONST NoChartData='No data for chart.'; ... TextRect (R, x, y, NoChartData, TR); ... Compiling ./comp/rtschart.pas 100 144.684/149.856 Kb Used 200 144.801/150.112 Kb Used 300 144.859/150.112 Kb Used 400 144.

[fpc-pascal] Error: Can't take the address of constant expressions

2011-02-21 Thread Roland Turcan
Hello all, I have this code: type TMyObj = class private MyPWord:PWord; ... end; procedure TMyObj.Some; begin ... Inc (Cardinal (MyPWord), 2); ... end; and compiler says %subj% This code works fine on 32bit compiler, but what sh

Re: [fpc-pascal] Erorr: Illegal type conversion: "Set Of ShortInt" to "LongInt"

2010-10-08 Thread Roland Turcan
Thanks for fast and helpful answer. It works fine. TRoland; <<< 08.10.2010 10:41 - Jonas Maebe "jonas.ma...@elis.ugent.be" >>> JM> On 08 Oct 2010, at 10:33, Roland Turcan wrote: >> I have this conversion: >> >> type TWordSet = set of 0

[fpc-pascal] Erorr: Illegal type conversion: "Set Of ShortInt" to "LongInt"

2010-10-08 Thread Roland Turcan
Hello FPC-Pascal users discussions! I have this conversion: type TWordSet = set of 0..15; PWordSet = ^TWordSet; var btn: TMsgDlgButtons; begin ... Integer(PWordSet(@btn)^) := Params[0]; // Params is Variant ... end; With FPC 2.4 it is OK, but up-to-date FPC SVN reports error in su

[fpc-pascal] Fatal: Internal Error 20051152

2010-01-28 Thread Roland Turcan
Hello friends, It started to show this %subject% since I added some code into {$IF MyBoolCondition} example: {$MODE Delphi} Unit MyUnit; interface Uses MyConditions; {$IF MyCond} //some declaration implementation // some code {$ELSE} //some declaration implementation // some code {$IF

Re: [fpc-pascal] Delphi mode syntax error

2010-01-19 Thread Roland Turcan
<<< 19.01.2010 13:10 - Jonas Maebe "jonas.ma...@elis.ugent.be" >>> JM> On 19 Jan 2010, at 12:57, Michael Van Canneyt wrote: >> It should not compile in Delphi mode. >> Array syntax is not supported by Delphi. JM> Oops, only now I see he was trying to index a pointer like an array. JM> And even

Re: [fpc-pascal] Delphi mode syntax error

2010-01-19 Thread Roland Turcan
<<< 19.01.2010 11:39 - Jonas Maebe "jonas.ma...@elis.ugent.be" >>> JM> On 19 Jan 2010, at 11:27, Jonas Maebe wrote: >> On 19 Jan 2010, at 11:14, Roland Turcan wrote: >> >>> ShowMessage (IntToStr (MyItems[0])); >> >>

[fpc-pascal] Delphi mode syntax error

2010-01-19 Thread Roland Turcan
Hello all, I use Delphi style of programing in Lazarus to keep a compatibility with Kylix and therefore I want to get this code which is valid of Freepascal's ObjectPascal, but in {$MODE Delphi} it doesn't accept calling of "MyItems[index]" and writes "Array type required". How to adapt this code

[fpc-pascal] GetProcAddress

2010-01-14 Thread Roland Turcan
Hello friends, I have written a very simple library which contains only two exports. It is intended to be a bridge between an old application and clipboard on linux to exchange data. --- library clipbrdgtk; {$MODE Delphi} uses Classes, Interface

Re: [fpc-pascal] Building SVN on Mac OS X 10.5.8 intel

2009-12-15 Thread Roland Turcan
<<< 03.12.2009 15:24 - Jonas Maebe "jonas.ma...@elis.ugent.be" >>> JM> On 03 Dec 2009, at 14:45, Roland Turcan wrote: >> I am not able to build SVN 14295. >> >> /Users/test/lazarus/fpcsrc/compiler/ppc386 -XX -CX -Ur -Xs -O2 -n - >> Fu/Us

[fpc-pascal] Building SVN on Mac OS X 10.5.8 intel

2009-12-03 Thread Roland Turcan
Hello FPC-Pascal users discussions! I am not able to build SVN 14295. /Users/test/lazarus/fpcsrc/compiler/ppc386 -XX -CX -Ur -Xs -O2 -n -Fu/Users/test/lazarus/fpcsrc/rtl/units/i386-darwin -Fu/Users/test/lazarus/fpcsrc/packages/univint/units/i386-darwin -FE. -FUunits/i386-darwin -di386 -dRELEAS

[fpc-pascal] How to add new function related to MAC OS X

2009-05-22 Thread Roland Turcan
Hello fpc-pas...@lists.freepascal.org! 1. I want to add new function for Mac OS X which calls FCNTL with F_FULLSYNC to the existing source tree, but I am really confused from the files to be changed/added. I see that there are many include files which declare functions for Mac OS X, but they come

Re[2]: [fpc-pascal] Calling DO_SYSCALL on Mac OS X

2009-05-20 Thread Roland Turcan
<<< 20.5.2009 15:54 - Jonas Maebe "jonas.ma...@elis.ugent.be" >>> JM> On 20 May 2009, at 15:40, Roland Turcan wrote: >> I need to flush buffers from TFileStream which I should use function >> "fpfsync (Handle)", but as far as I found

[fpc-pascal] Calling DO_SYSCALL on Mac OS X

2009-05-20 Thread Roland Turcan
Hello FPC-Pascal users discussions! I need to flush buffers from TFileStream which I should use function "fpfsync (Handle)", but as far as I found, there is no implementation of DO_SYSCALL for mac. DO_SYSCALL is implemented only for BSD. When my application crashes all files modified over TFileSt

[fpc-pascal] FlushBuffers of FileStream

2009-04-30 Thread Roland Turcan
Hello FPC-Pascal users discussions! I have used this Delphi/Kylix3 this code for flushing of buffers in my own stream descendant {$IFDEF WIN32} FlushFileBuffers (Handle); {$ELSE} fdatasync (Handle); {$ENDIF} I have found in linux.pp calling of fdatesync, but ... How to flush buffers in Mac

[fpc-pascal] ASM code conversion from Delphi

2009-04-29 Thread Roland Turcan
Hello all, How can I write as ASM this assignment which is valid code for Delphi: mov DWord ptr TCPUIDData (edi).r_eax,eax where TCPUIDData is declared as: TYPE TCPUIDData =PACKED RECORD r_eax :CARDINAL; r_ebx

[fpc-pascal] RECORD alignment issue on Mac OS X intel based

2009-04-27 Thread Roland Turcan
5 db>> db>> but on Intel Based Mac OS X 10.5 Mini with Intel Duo 2 Core it db>> DOESN'T. Therefore I have problems with parsing of binaries back to db>> memory. db>> db>> I don't expect CPU specific problem, otherwise it would not work db>>

Re[2]: [fpc-pascal] Access violation during compilation and linking

2009-03-12 Thread Roland Turcan
Hello Jonas, At first, thank you for your reply. <<< 12.3.2009 10:09 - Jonas Maebe "jonas.ma...@elis.ugent.be" >>> JM> Roland Turcan wrote on do, 12 mrt 2009: >> It often happens to me, that during compilation FPC raises an >> exception and often is en

[fpc-pascal] Access violation during compilation and linking

2009-03-12 Thread Roland Turcan
Hello all, It often happens to me, that during compilation FPC raises an exception and often is enough just to clean up directories where are *.o and *.ppu located. Sometimes it depends also on a problem in my code, but it is very difficult to distinguish where the problem is. Can I build FPC wit

[fpc-pascal] Building latest SVN

2008-09-23 Thread Roland Turcan
Hello FPC-Pascal users discussions! It stops with message: > systemh.inc(84,2) Error: User defined: Building trunk is only > supported when using the latest release as a starting compiler. but it is uncomfortable to rollback to latest release to build up latest SVN. There must be "nicer" way, b

Re[2]: [fpc-pascal] Binary compatibility between Intel CPU and PowerPC CPU

2008-09-16 Thread Roland Turcan
here JW> the most users are. Its a decision you'll have to make on your own, though. JW> Jeff. JW> Roland Turcan wrote: >> Hello FPC-Pascal users discussions! >> >> What is the best way to keep the binary compatibility among different >> CPU architectures. &

[fpc-pascal] Binary compatibility between Intel CPU and PowerPC CPU

2008-09-16 Thread Roland Turcan
Hello FPC-Pascal users discussions! What is the best way to keep the binary compatibility among different CPU architectures. I need to make our own database engine compatible and other binary files, that user still can use our data from i386 or PowerPC computer. I really don't like the idea to c

Re[4]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-08-04 Thread Roland Turcan
ng story" and nothing is shown. Then I press Ctrl-C MG> ^C MG> Program received signal SIGINT, Interrupt. MG> 0x917803a8 in poll$UNIX2003 () MG> (gdb) PS: msgview.lrs and msgview.lfm are from SVN 15417. TRoland; <<< 4.8.2008 18:08 - Mattias Gärtner "[EMAIL PROTECTED]&

Re[2]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-08-04 Thread Roland Turcan
Hello All, Does anybody have any idea, what I can do with this problem? Thanks. TRoland; <<< 4.8.2008 14:08 - "Vinzent Höfler" "[EMAIL PROTECTED]" >>> VH> Original-Nachricht >> Zitat von Roland Turcan <[EMAIL PROTECTE

Re[4]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-08-04 Thread Roland Turcan
code 02. <<< 4.8.2008 12:03 - Roland Turcan "[EMAIL PROTECTED]" >>> RT> Hello Mattias, RT> I have forgotten to send also result of building under gdb. Here is: RT> Compiling ./unit/ResConf.pas RT> Assembling resconf RT> An unhandled exception occurred a

Re[3]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-08-04 Thread Roland Turcan
TOutputFilter.Execute W3 TOutputFilter.Execute W4 TOutputFilter.Execute W5 TOutputFilter.Execute W6 TOutputFilter.Execute W7 TExternalToolList.Run Exception: there was an error ERROR: tool reported error TRoland; <<< 4.8.2008 11:56 - Roland Turcan "[EMAIL PROTECTED]" >>

Re[2]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-08-04 Thread Roland Turcan
tFilter.Execute W4 TOutputFilter.Execute W5 TOutputFilter.Execute W6 TOutputFilter.Execute W7 TExternalToolList.Run Exception: there was an error ERROR: tool reported error TRoland; <<< 25.7.2008 0:45 - Mattias Gaertner "[EMAIL PROTECTED]" >>> MG> On Thu, 24 Jul 2008 2

Re[6]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-07-24 Thread Roland Turcan
uot;[EMAIL PROTECTED]" >>> MG> Zitat von Roland Turcan <[EMAIL PROTECTED]>: >> Hello Mattias, >> >> Next backtrace: >> >> Compiling ./unit/ResConf.pas >> Assembling resconf >> An unhandled exception occurred at $00148A20 : >> &g

Re[4]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-07-23 Thread Roland Turcan
r "[EMAIL PROTECTED]" >>> MG> Zitat von Roland Turcan <[EMAIL PROTECTED]>: >> Hello all, >> >> Backtrace from lazbuild: >> >> An unhandled exception occurred at $00148A30 : >> >> Breakpoint 1, 0x00018090 in fpc_rais

Re[2]: [fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-07-22 Thread Roland Turcan
from terminal then terminal's menu is shown instead of lazarus' one. Thanks. TRoland; <<< 22.7.2008 11:28 - Mattias Gaertner "[EMAIL PROTECTED]" >>> MG> On Tue, 22 Jul 2008 11:02:40 +0200 MG> Roland Turcan <[EMAIL PROTECTED]> wrote: >>

[fpc-pascal] Ugly exception during compilation FPC 2.3.1 MacOS X 10.5 PowerPC

2008-07-22 Thread Roland Turcan
Hello FPC-Pascal users discussions! Compilation shows me next ugly error messages during building lazarus with our components. How can I turn on move verbose outputs to see more about the problem. The strangest is, the same source code is buildable into Lazarus/Linux without any problem, but Lin

[fpc-pascal] Error during creation of DEB package on Ubuntu

2008-07-09 Thread Roland Turcan
Hello FPC-Pascal, I have tried to build DEB package from latest snapshot and I've got this result: dh_gencontrol -i dh_md5sums -i dh_builddeb -i -- -Z bzip2 dpkg-deb: building package `fpc' in `../fpc_2.3.1-20080709_all.deb'. dpkg-deb: building package `fpc-source' in `../fpc-source_2.3.1-200807

[fpc-pascal] Error during building DEB package

2008-07-08 Thread Roland Turcan
Hello FPC-Pascal users discussions! [EMAIL PROTECTED]:/usr/lib/lazarus/fpcbuild$ sudo make deb NOGDB=1 [sudo] password for user: Debian version (2.2.2rc1) is not correct, expect 2.2.3 make: *** [debcheck] Error 1 What could it be a problem? Upgrade from 7.10 to 8.04 didn't solve this problem. T

[fpc-pascal] Shared library with resources which contain bitmaps on Linux -- second try

2008-06-24 Thread Roland Turcan
Hello FPC-Pascal users discussions! How can I build a shared library which contains many bitmaps loaded dynamically from the code using by: procedure TForm1.Button1Click(Sender: TObject); CONST MYRES_DLL='./libmyres.so'; begin FhMod := LoadLibrary (PCHAR (MYRES_DLL)); IF FhMod = 0 THEN b

[fpc-pascal] Shared library with resources which contain bitmaps on Linux

2008-06-23 Thread Roland Turcan
Hello FPC-Pascal users discussions! How can I build a shared library which contains many bitmaps loaded dynamically from the code using by: procedure TForm1.Button1Click(Sender: TObject); CONST MYRES_DLL='./libmyres.so'; begin FhMod := LoadLibrary (PCHAR (MYRES_DLL)); IF FhMod = 0 THEN b