Problem compiling with gpc and "Uses Crt" statement in crtc.c
Bruce Mahfood
kbmahf@gmail.com
Thu Jun 7 20:41:00 GMT 2007
Hey thanks. I recognised that the problem was in a system level C
file, when I was trying to compile a Pascal file. The thing is that
gpc is a Pascal compiler that is linked against the gcc backend. The
GNU Pascal page
(http://directory.fsf.org/devel/prog/pascal/GNUPascal.html) states
that it implements ISO Pascal, Borland Pascal 7.0, and parts of other
Pascal standards or de-facto standards.
I tried removing the call to Use Crt, and have other errors. I am
going to ask my question on the GNU-Pascal mailing list, since you do
not seem to feel that this is a Cygwin issue, but a) since gpc speaks
Borland, I would assume that it is not being messed up with the Uses
Crt, and b) since gpc comes as a part of the Cygwin install, and since
I installed it using the Cygwin Setup executable, I would think that
there should be no problem with it finding the correct object file,
but in this case it didn't. Why would gpc start a gcc compile of the
crtc.c file? I don't know that answer to that question.
Any other takes on this would be appreciated. As I said, I am going
to chat on the GNU-Pascal list, but if anyone was seen this or has an
idea, I would be very appreciative.
Bruce
On 6/7/07, Dave Korn <dave.korn@artimi.com> wrote:
> On 07 June 2007 20:13, Bruce Mahfood wrote:
>
> > I am using gpc to compile code which contains the statement "Uses
> > Crt". I get over 600 error lines. I am attaching the output of
> > cygcheck -s -v -r, along with the output that I am getting from my
> > compilation, as well as a test file that I have created which gives me
> > the same errors.
> >
> > The command line that I am using is:
> >
> > gpc --automake --unit-path=/usr/lib/gcc/i686-pc-cygwin/3.4.4/units/ -g
> > test.pas
> >
> > I have also used:
> >
> > C:\cygwin\lib\gcc\i686-pc-cygwin\3.4.4\units
> >
> > in the unit-path. Both paths gave the same results.
>
> I don't speak pascal, but I can tell you that that is almost certainly the
> wrong thing to do. Anything under /usr/lib/gcc is private and internal and
> belongs to gcc (and its subcompiler gpc) only. The compiler should pull it in
> automatically when it needs to and not when it doesn't and it should
> automatically know what and where it is and never need to be told.
>
> > Basically the problem seems to be an issue with compiling crtc.c.
>
> I think you probably don't want to be recompiling the internal runtime
> support stuff anyway.
>
> > Thanks for your help...
>
> I'm afraid I can't help much, as I don't speak pascal. Your example
> compiles ok with the "Uses" statement removed. A five-second google tells me
> that "Uses Crt" is a Borland extension, so maybe all you need do is omit it?
> (I think this is maybe a bit like the old getch() function that everyone used
> in Borland C and MSVC to wait for a keypress but that is not part of the C
> language and so does not exist in many other compilers/runtime libraries).
>
>
> cheers,
> DaveK
> --
> Can't think of a witty .sigline today....
>
>
> --
> Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
> Problem reports: http://cygwin.com/problems.html
> Documentation: http://cygwin.com/docs.html
> FAQ: http://cygwin.com/faq/
>
>
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
More information about the Cygwin
mailing list