Re: [fpc-pascal] Linking pthread?
Hi Anton Thanks for the pointers! libpthread was installed under /lib, but for some reason I had to copy libpthread.so.0 to libpthread.so to get ld to see it. Regards David On Sat, 20 Aug 2005 22:21:53 +0200, you wrote: >Hi, > >David Butler wrote: > >>Hi >> >>When I compile an application that uses libc under Linux I get: >> >>"/usr/bin/ld: cannot find -lpthread" >> >>From what I gather pthread is a standard library. How do I get the >>linker to find it? >> >>Thanks. >> >>David >> >> >>___ >>fpc-pascal maillist - fpc-pascal@lists.freepascal.org >>http://lists.freepascal.org/mailman/listinfo/fpc-pascal >> >> >> >Either the linker doesn't find it, or it's not there. On my linux box, >there's a /lib/libpthread.so.0 -> /lib/libpthread-0.10.so, which is >easily found by ld. You can check if a /lib/libpthread.so.? is installed >on your system, or check ldconfig, e. g. > >ldconfig -v | grep libpthread > >Or you can add linker options to ld using fpc's "-k" option, e. g. >"-k-v" for ld's -v option. > >hth, > >Anton. > > >___ >fpc-pascal maillist - fpc-pascal@lists.freepascal.org >http://lists.freepascal.org/mailman/listinfo/fpc-pascal ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] HeapError variable access
At 18:13 20-8-2005, you wrote: Hi, I'm working with a unit someone developed for FPC in 2001. Compiling under FPC 2.0.0, I'm getting the following error... wErrors0.pp(279,23) Error: Identifier not found "HeapError" From this code segment... procedure SetHeapErrorHandle; //=== // Defines a new HeapError handler, from this library. const fFirst : boolean = TRUE; // security, such that entering a second time is harmless begin if (not fFirst) then exit; fFirst:=FALSE; // the next time, will exit immediatly // Memorises the original Heap error handler glpfHeapErrorHandler:=HeapError; // defines the address of the new Heap Error handler. HeapError:=HeapErrorHandle; end; // SetHeapErrorHandle Section 8.4.2 of the prog.pdf doc "The Heap Grows", suggests that HeapError is a pointer that should be available for reference. Any suggestions would be appreciated. The variable is not supported and therefor removed to prevent misbehaviour. Peter ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal
[fpc-pascal] fpc 2.0 and DOM/xml under OS/2 gives me "Process terminated by SIGSEGV"
Hi, I have the following snippet of code (which works under Windows): PROGRAM XMLTest; USES Dom, XMLRead; PROCEDURE ProcessItem(Node: TDOMNode); VAR i: Integer; attr: TDOMNode; Title,Desc,Link,pubDate : String; BEGIN Title:=''; Desc:=''; Link:=''; pubDate:=''; WHILE Node<>Nil DO BEGIN IF (Node.NodeName='title') AND (Node.FirstChild<>Nil) THEN Title:=Node.FirstChild.NodeValue; // <--- Dies here??? IF (Node.NodeName='description') AND (Node.FirstChild<>Nil) THEN Desc:=Node.FirstChild.NodeValue; IF (Node.NodeName='link') AND (Node.FirstChild<>Nil) THEN Link:=Node.FirstChild.NodeValue; IF (Node.NodeName='pubDate') AND (Node.FirstChild<>Nil) THEN pubDate:=Node.FirstChild.NodeValue; Node:=Node.NextSibling; END; END; PROCEDURE ProcessNode(Node: TDOMNode); BEGIN IF (Node.NodeName='item') AND (Node.FirstChild<>nil) THEN ProcessItem(Node.FirstChild) ELSE BEGIN IF Node.FirstChild<>nil then ProcessNode(Node.FirstChild); END; IF Node.NextSibling<>nil then ProcessNode(node.NextSibling); END; PROCEDURE ProcessXML(FileName: String); VAR xml: TXMLDocument; BEGIN ReadXMLFile(xml,FileName); ProcessNode(xml); xml.Free; END; BEGIN ProcessXML('ts2.xml'); END. When run with this xml file it crashes in ProcessItem (when it tries to get the Title): Test XML 60 This is a test http://www.somewhere.com Fri, 19 Aug 2005 03:58:37 -0800 Any ideas why? -- Hilsen Søren ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.0 for cygwin
Matt Emson wrote: >>Is there some posibility to make (compiling) fpc without fpc? >>Is there some makefile or script in fpc (cvs) to avoid to use a fpc >>1.0.0 or 2.0.0 to create a fpc new version? > > > Cygwin runs exclusively on Windows machines... FPC has a Windows port. > Whilst I can see the point of a port to Cygwin, I seriously can't understand > why you can't use the Windows compiler to bootstrap the compiler. Cygwin is > just a bunch of DLLs and support binaries at the end of the day, and > creating a minimal bootstrap implementation using the Windows compiler, > whilst not trivial, is the simplest way of doing it. Am I missing some > reason for not using the Win32 compiler? > > By the way, how would one compile Pascal code without a Pascal compiler? No > magic script file will avoid the need for fpc. Same applies to gcc ;) Without an older gcc you can't build a new one except using a propritary compiler. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.0 for cygwin
> Same applies to gcc ;) Without an older gcc you can't build a new one > except using a propritary compiler. > But where did that proprietary compiler come from? Hardware based? Molecules, Ions, and atoms? i.e. the answer to the big bang theory, the answer to religion, etc. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Linking pthread?
There is a tip here, you might simply need something like libc6-dev or libc6-devel http://www.mail-archive.com/[EMAIL PROTECTED]/msg03630.htm l ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.0 for cygwin
L505 wrote: Same applies to gcc ;) Without an older gcc you can't build a new one except using a propritary compiler. But where did that proprietary compiler come from? Hardware based? Molecules, Ions, and atoms? i.e. the answer to the big bang theory, the answer to religion, etc. The first compilers were written in assembly language. This allowed for the next generation compilers to be written in a high level language. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.0 for cygwin
L505 wrote: Same applies to gcc ;) Without an older gcc you can't build a new one except using a propritary compiler. But where did that proprietary compiler come from? Hardware based? Molecules, Ions, and atoms? i.e. the answer to the big bang theory, the answer to religion, etc. See also: http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29 ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.0 for cygwin
> The first compilers were written in assembly language. This allowed for > the next generation compilers to be written in a high level language. And the assembly language was just magically inserted into the memory with that magic script? At some point it comes to a hardware etching level, I'm guessing. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.0 for cygwin
L505 wrote: The first compilers were written in assembly language. This allowed for the next generation compilers to be written in a high level language. And the assembly language was just magically inserted into the memory with that magic script? At some point it comes to a hardware etching level, I'm guessing. I know nothing about the first program, executed by the first computer, if that's what you are asking, but I guess it was probably written by hand in machine language. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Re: [fpc-pascal] Freepascal 2.0 for cygwin
> > The first compilers were written in assembly language. This allowed > for > > the next generation compilers to be written in a high level language. > > > And the assembly language was just magically inserted into the memory > with that magic script? Any device that can enter data via I/O. Punchcards, dipswitches on the device. Later magnetic drum etc. Handcode the instructions etc. But keep in mind that "compilers" are as old as the fifties, and assemblers are probably older. However even in the eighties a lot of compilers were still written at least for a significant part in assembler. Only the more research oriented weren't, for maintainability. There probably never was one original compiler. This step (nothing -> asm -> compiler) has made a zillion time probably. Typically a simpler version of the compiler (think few thousand lines) were used to compile the full ones. However that limited the language and RTL that can be used to program the full ones. So when in the nineties compilers and auxiliery tools as linkers and assemblers became more readily available, more advanced compilers started to become used to build new compilers. ___ fpc-pascal maillist - [EMAIL PROTECTED] http://lists.freepascal.org/mailman/listinfo/fpc-pascal