I am porting code from Kylix to Lazarus and I have a few questions: 1) ErrNo from Libc…
Den Jean wrote 11 lines
Strange, the version of FPC should not matter in this ?
Show quoted text 10 lines
Fixed, an omission on my part.
Michael.

Mailing lists / lazarus / 2003-12
9 messages · 3 people ·
Reply by email Subscribe to this list Your subscription
Read-only archive. Use j and k to move between messages.
I am porting code from Kylix to Lazarus and I have a few questions: 1) ErrNo from Libc…
Strange, the version of FPC should not matter in this ?
Fixed, an omission on my part.
Michael.
I am porting code from Kylix to Lazarus and I have a few questions: 1) ErrNo from Libc…
If it is defined in the libc unit it doesn't mean that it can linked (it has to be in the libc library aswell)
But that's probably not the case here. IIRC, erno is a var and there was something with exported vars and libraries
There is no mousewheel support yet.
Marc
Hi,
I am porting code from Kylix to Lazarus
and I have a few questions:
1) ErrNo from Libc does not compile
eg uses Libc;
writeln(Libc.ErrNo)
gives error messages:
undefined reference to `errno'
Error:Error while linking
But if you click on ErrNo it shows its definition in Libc
I use it after call to setsockopt2) I use the mousewheel for zoom, but I cannot
find the corresponding procedure
function DoMouseWheel(Shift: TShiftState;
WheelDelta: Integer;
const MousePos: TPoint):
Boolean; dynamic;
How do you add MouseWheel support to a TPaintBox ?Ps : I use fpc-1.9.1-031129.i386.rpm, Lazarus CVS (today) on Mandrake 9.2
regards
thx already and All the best for 2004.
Den Jean
The point is that glibc no longer exports the libc 'errno' variable on newer systems. This has broken many C programs, and is also completely incompatible with the libc units. I have fixed the units (see cvs) but this means that those units can no longer be used by default on old systems.
Here is the explanation I put in the README file that accompagnies the Libc unit:
----------------------------------------------------------------------- Note on the Libc errno variable. On recent systems the errno symbol is no longer published in libc. It has been replaced by a __errno_location pointer, with a macro in the C header files to mask this. The pascal Libc files assume this by default. This also means you cannot set the errno value directly, you must use the 'seterrno' procedure for that. (see errno.inc)
The old mechanism of a published errno libc variable is still available by setting the LIBC_OLDERRNO define when compiling the libc units. -----------------------------------------------------------------------
At a later stage we can maybe try to detect .
I am porting code from Kylix to Lazarus and I have a few questions: 1) ErrNo from Libc…
Hi,
Libc.ErrNo:
thanks alot for the very quick response.
I see the change in the new fpc cvs.
1) But lazarus won't run anymore if compiled
with this fpc. It however I compile it with
fpc-1.9.1-031129.i386.rpm, it works fine.
2) I also tried compiling fpc with a
{$define LIBC_OLDERRNO} added at the top of
unit libc.
But then fpc does not compile :
ppc386 -XX -CX -Xs -OG2p3 -n -Fu/other/storage/rpms/lazarus/cvs/fpc/rtl/linux -Fl/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.1 -Fl/usr/X11R6/lib -Fl/usr/lib/qt3/lib -di386 -dRELEASE libc.pp
errno.inc(4,16) Error: overloaded identifier "errno" isn't a function libc.pp(255) Fatal: There were 1 errors compiling module, stopping
kind regards and CU next year
Den Jean
I am porting code from Kylix to Lazarus and I have a few questions: 1) ErrNo from Libc…
Marc Weustink wroteYep, this was a bug in fpc/rtl/linux/unixsysc.inc it is fixed an hour ago.
great, lazarus works now (thx for the fix faster than light)
but my program does not compile now with CVS fpc
it does with fpc-1.9.1-031129.i386.rpm
I get the message : foo.pas(2248,26) Fatal:Internal error 200212141
A grep reveal that this error is raised in ./compiler/ncal.pas
I will try make a small program that still reproduces the problem and provide that.
kind regards,
Den Jean
I am porting code from Kylix to Lazarus and I have a few questions: 1) ErrNo from Libc…
Yep, this was a bug in fpc/rtl/linux/unixsysc.inc
it is fixed an hour ago.
Marc
Compile the fpc sources with OPT=-g
then it has debuginfo
I am porting code from Kylix to Lazarus and I have a few questions: 1) ErrNo from Libc…
To be honest, it wasn't me who fixed it. I ran into it yesterday. When you wrote it, Marco V had just fixed it.
I'm runnig a CVS version from yesterday with only the file updated I mentioned.
Marc
I am porting code from Kylix to Lazarus and I have a few questions: 1) ErrNo from Libc…
Hi,
since a couple of days Lazarus stalls at startup if compiled with CVS FPC (it does not stall if compiled with fpc-1.9.1-031129.i386.rpm) (I use Lazarus on Mandrake 9.2)
gdb learned me that Lazarus stalls at
line 2758 of definetemplates.pas (TheProcess.WaitOnExit;)
if I compile Lazarus with fpc-1.9.1-031129.i386.rpm it just runs fine
fpc CVS was compiled/installed this way:
cd cvs/fpc
make clean
make all
make install
fpc-1.9.1-031129 was installed this way:
urpme fpc-1.9.1-031129.i386
urpmi fpc-1.9.1-031129.i386.rpm
and debugging with gdb:
//new for me, so give me a break,
//long live integrated debugging since TP 3 :-)gdb
set args --no-splash-screen
b TMAINIDE__INITCODETOOLBOSS
r
... did 'n' till ...
the line ADefTempl:=CreateFPCTemplate(EnvironmentOptions.CompilerFilename,'',
then step into ('s')
and 's' till line 2758, there it stops (TheProcess.WaitOnExit)
BTW 'l' (list) doesn't work there for some reason, in main.pp it still worked
could someone tell me what to say to gdb
so gdb always knows the sourcefiles for debugging a typical lazarus cvs dir lay-out
kind regards,
Den Jean