Hi I'm hoping someone out there has some suggestions for how to go about fixing this. I've got gpc & gcc installed on an Ultra 10 running Solaris 2.7. The program is simply suppose to invoke the system sort command but as you can see we're not getting it to compile.
The compile error is: ------------------------ [09:44:46] sdis:~/sdis >gpc sort.pas sort.pas: In function `program_Sort': sort.pas:11: undeclared identifier `Pexecute' (first use this function) sort.pas:11: (Each undeclared identifier is reported only once sort.pas:11: for each function it appears in.) sort.pas:12: undeclared identifier `Pexecute_one' (first use this function) sort.pas:12: undeclared identifier `Pexecute_search' (first use this function) sort.pas:12: undeclared identifier `Pexecute_verbose' (first use this function) [09:44:55] sdis:~/sdis >
The code consists of: ------------------------ program Sort (Input, Output); uses GPC, Pipe; var Status: Integer; Command: TString; Message: TString; Argument: array [0 .. 1] of CString = (nil, nil); begin Command := 'Sort -k .9,.10 test.txt'; Status := PExecute (Command, PCStrings (@Argument), Message, PExecute_One or PExecute_Search or PExecute_Verbose); if Status < 0 then WriteLn ('PExecute (Sort) : ', Message) else WriteLn ('PID ', Status) end.
My compiler versions are: ------------------------ [09:23:29] root:~ >gpc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.8.1/specs gpc version 19990118, based on gcc-2.8.1
[09:23:32] root:~ >gcc -v Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.7/2.95.2/specs gcc version 2.95.2 19991024 (release) [09:23:39] root:~ >
tam (axtlp@uaa.alaska.edu)
Hi Tam!
On Fri, Apr 05, 2002 at 02:00:09PM -0900, Tam Pikey wrote:
The compile error is:
[09:44:46] sdis:~/sdis >gpc sort.pas
Try gpc --automake sort.pas because you use units.
Eike
And probably your `Command' should be only 'sort', '-k .9,.10 test.txt' are the `Arguments', if I understand correctly what's going on here.
Emil Jerabek