Simple GNU P calls GNU C works on Redhat but not Cygwin!
I just got home and received African Chief's advice and thought I would try African Chief's fix out with Cygwin (I haven't got Linux at home yet). I first tried the version that worked on Linux, but got error messages with Cygwin. My files are pcallc.p, ccall.c, ccall.h and Makefile. The error messages are at the bottom. I would be grateful for any ideas. Thanks, Chris pcallc.p: [ program pascalcallsC(input,output); procedure world; external name 'world'; begin writeln("Hello world from Pascal"); world; end. ] ccall.c: [ #include <stdio.h> #include "ccall.h" void world (void) { printf("\nHello World from C\n"); } ] ccall.h: [ extern void world(void); ] Makefile: [ pcallc : pcallc.p ccall.o gpc -o pcallc pcallc.p ccall.o ccall.o : ccall.c gcc -c ccall.c clean: rm *.o pcallc ] Error messages (typed manually - don't know how to cut and paste from a bash X console!): [ /usr/lib/gcc-lib/i686-cygwin/3.2.3/libgpc.a(rts.o)(.text+0x18ef):rts.c: undefined reference to `_ftruncate64' /usr/lib/gcc-lib/i686-cygwin/3.2.3/libgpc.a(rts.o)(.text+0x18b4):rts.c: undefined reference to `_lseek64' collect2: ld returned 1 exit status make: *** [pcallc] Error1 ] Dr Christian Hicks Senior Lecturer, School of Mechanical & Systems Engineering, Stephenson Building, University of Newcastle upon Tyne, NE1 7RU. Phone: +44 191 222 6238 Mobile 0795 8317804 Fax: + 44 191 222 8600 Homepage: http://www.staff.ncl.ac.uk/chris.hicks
On 14 Nov 2003 at 18:32, Dr Christian Hicks wrote:
I just got home and received African Chief's advice and thought I would try African Chief's fix out with Cygwin (I haven't got Linux at home yet). I first tried the version that worked on Linux, but got error messages with Cygwin. My files are pcallc.p, ccall.c, ccall.h and Makefile. The error messages are at the bottom. [...]
Error messages (typed manually - don't know how to cut and paste from a bash X console!): [ /usr/lib/gcc-lib/i686-cygwin/3.2.3/libgpc.a(rts.o)(.text+0x18ef):rts.c: undefined reference to `_ftruncate64' /usr/lib/gcc-lib/i686-cygwin/3.2.3/libgpc.a(rts.o)(.text+0x18b4):rts.c: undefined reference to `_lseek64' collect2: ld returned 1 exit status make: *** [pcallc] Error1 ] [....]
This is odd. Sounds like an old problem that has been fixed long ago. What is the output of "gpc -v" ? Perhaps you should download an updated GPC snapshot from here: http://gnu-pascal.de/contrib/chief/win32/cygwin/ Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.bigfoot.com/~african_chief/
On Fri, 14 Nov 2003, Dr Christian Hicks wrote: [..]
Error messages (typed manually - don't know how to cut and paste from a bash X console!):
While not the only way an easy way is to use redirection and send the output to a file. See man page for bash starting at about line 1648. Russ
participants (3)
-
Dr Christian Hicks -
Prof A Olowofoyeku (The African Chief) -
Russell Whitaker