[fpc-pascal] nano-x

2006-06-20 Thread Carsten Bager
I am trying to convert nano-X.h to a pas file but I get some errors. This is 2 of them. I cannot se what the problem is, can anyone give me a hint. Carsten at line 698 error : syntax error at line 964 error : syntax error Unexpected wrap of line 964 " { GR_WM_PROPERTIES props

[fpc-pascal] Nano-x

2006-07-20 Thread Carsten Bager
I am trying to write a small program using the nano-x library. - Unit NanoX; interface {$mode objfpc} Const LibNanoX='nano-X'; function GrOpen:longint;cdecl;external LibNanoX; implementation end. -- program Nanoxdemo; uses NanoX,linux,sysutils; begin if

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Michael Van Canneyt
On Thu, 20 Jul 2006, Carsten Bager wrote: I am trying to write a small program using the nano-x library. - Unit NanoX; interface {$mode objfpc} Const LibNanoX='nano-X'; function GrOpen:longint;cdecl;external LibNanoX; implementation end. -- program Nanoxde

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Marco van de Voort
> > You need to link to the C library as well. > > So, add > > {$linklib c} _Never_ add linklib c or linklib gcc directly, always work via unit initc. That's what it is for. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.fre

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Michael Van Canneyt
On Thu, 20 Jul 2006, Marco van de Voort wrote: You need to link to the C library as well. So, add {$linklib c} _Never_ add linklib c or linklib gcc directly, always work via unit initc. That's what it is for. I thought the compiler did this automatically when it detects a link to the C

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Marco van de Voort
> On Thu, 20 Jul 2006, Marco van de Voort wrote: > > >> > >> You need to link to the C library as well. > >> > >> So, add > >> > >> {$linklib c} > > > > _Never_ add linklib c or linklib gcc directly, always work via unit initc. > > That's what it is for. > > I thought the compiler did this automa

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Michael Van Canneyt
On Thu, 20 Jul 2006, Marco van de Voort wrote: On Thu, 20 Jul 2006, Marco van de Voort wrote: You need to link to the C library as well. So, add {$linklib c} _Never_ add linklib c or linklib gcc directly, always work via unit initc. That's what it is for. I thought the compiler did th

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Marco van de Voort
> On Thu, 20 Jul 2006, Marco van de Voort wrote: > > (libdl,libgettext,libgcc), and to encapsulate libc errno access. > > > > There shouldn't be a {$linklib C or linklib gcc in any unit. _always_ via > > unit initc. > > If you really believe that: > I suggest you start working on the sources in SV

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Michael Van Canneyt
On Thu, 20 Jul 2006, Marco van de Voort wrote: On Thu, 20 Jul 2006, Marco van de Voort wrote: (libdl,libgettext,libgcc), and to encapsulate libc errno access. There shouldn't be a {$linklib C or linklib gcc in any unit. _always_ via unit initc. If you really believe that: I suggest you sta

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Marco van de Voort
> On Thu, 20 Jul 2006, Marco van de Voort wrote: > >> If you really believe that: > >> I suggest you start working on the sources in SVN then, because there are > >> _a lot_ of them. > >> > >> But I don't think that it should be done like that... > > > > Because? > > Because firstly I think that w

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Michael Van Canneyt
On Thu, 20 Jul 2006, Marco van de Voort wrote: On Thu, 20 Jul 2006, Marco van de Voort wrote: If you really believe that: I suggest you start working on the sources in SVN then, because there are _a lot_ of them. But I don't think that it should be done like that... Because? Because firs

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Marco van de Voort
(snip water under the bridge) > As for your arguments: > > You are 100% right that it may be a good thing to have a central place which > somehow regulates access to libc; It will make things clearer and more > maintainable. However, if you want to position it like that, I do think > that it

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Carsten Bager
> You need to link to the C library as well. When I use initc I get thise errors Linking nanoxdemo L:\Lib\fpc202\arm-linux\cprt0.o: In function `_start': : undefined reference to `__libc_start_main' L:\Lib\fpc202\arm-linux\cprt0.o: In function `_haltproc' : undefined reference to `_fini' L:\Lib\

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Michael Van Canneyt
On Thu, 20 Jul 2006, Marco van de Voort wrote: (snip water under the bridge) As for your arguments: You are 100% right that it may be a good thing to have a central place which somehow regulates access to libc; It will make things clearer and more maintainable. However, if you want to posi

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Michael Van Canneyt
On Thu, 20 Jul 2006, Carsten Bager wrote: > You need to link to the C library as well. When I use initc I get thise errors Linking nanoxdemo L:\Lib\fpc202\arm-linux\cprt0.o: In function `_start': : undefined reference to `__libc_start_main' L:\Lib\fpc202\arm-linux\cprt0.o: In function `_halt

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Marco van de Voort
> When I use initc I get thise errors > > Linking nanoxdemo > L:\Lib\fpc202\arm-linux\cprt0.o: In function `_start': > : undefined reference to `__libc_start_main' > L:\Lib\fpc202\arm-linux\cprt0.o: In function `_haltproc' > : undefined reference to `_fini' > L:\Lib\fpc202\arm-linux\cprt0.o: In fu

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Carsten Bager
> > On Thu, 20 Jul 2006, Carsten Bager wrote: > > > > You need to link to the C library as well. > > > > When I use initc I get thise errors > > > > Linking nanoxdemo > > L:\Lib\fpc202\arm-linux\cprt0.o: In function `_start': > > : undefined reference to `__libc_start_main' > > L:\Lib\fpc202\arm-

Re: [fpc-pascal] Nano-x

2006-07-20 Thread Michael Van Canneyt
On Thu, 20 Jul 2006, Carsten Bager wrote: On Thu, 20 Jul 2006, Carsten Bager wrote: You need to link to the C library as well. When I use initc I get thise errors Linking nanoxdemo L:\Lib\fpc202\arm-linux\cprt0.o: In function `_start': : undefined reference to `__libc_start_main' L:\Lib\

Re: [fpc-pascal] Nano-x

2006-07-21 Thread Carsten Bager
> Patch cprt0.as for your libc. The libc that my platform is using is micro libc, and unfortunately the micro libc is initialized the same way as libc. Does anyone have a hint? Carsten ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org h

Re: [fpc-pascal] Nano-x

2006-07-21 Thread Marco van de Voort
> > Patch cprt0.as for your libc. > > The libc that my platform is using is micro libc, and unfortunately the micro > libc is > initialized the same way as libc. > Does anyone have a hint? objdump a helloworld C program, and investigate. ___ fpc-pas