Hi, folks,
I hope someone can help me out. I haven't been able to compile any Pascal programs yet using DJGPP on Windows 95. I installed DJGPP a little while ago, and I can easily compile and run C programs (with gcc) and C++ programs (with gxx). I can still do that after installing GNU Pascal.
However, I cannot even compile a simple Hello World program using gpc. Here is the program listing for hello.pas. (I admit I'm a bit rusty with Pascal.)
Here is what I get when I try to compile:
I have a hunch, though. I installed DJGPP v2.95. Doesn't GPC assume that we have v2.81 installed? In my directory tree, I have D:\djgpp\lib\gcc-lib\djgpp. Before installing GPC, all I had in this directory was a directory called 2.95, which had files such as libgcc.a, specs, cc1.exe, and cpp.exe, along with the "include" directory containing files such as new and new.h.
After installing GPC, I had a 2.81 directory along with the 2.95 directory. Inside here, I had gpc1.exe, gpc-cpp.exe, libgpc.a, specs, and a units directory which contained files such as crt.inc, crt.pas, gpc.pas, and gmp.pas. (Aren't these the things that are required in the USES statement in the program?)
Also, to "install" GPC, all I did was (properly) decompress a _binary_ of it (preserving the directory structure). The file was called gpc-19990430-i386-pc-djgppv202.zip.
Thank you all very much. Any help would be appreciated.
-- Get paid to surf the web! Go to http://www.alladvantage.com/refhome.asp?refid=BVA866
Jawaad Ahmad wrote:
[Win95] C:\TEMP\pas>gpc hello.pas hello.pas:3: module/unit interface `Crt' could not be imported
gpc --automake hello.pas
I have a hunch, though. I installed DJGPP v2.95. Doesn't GPC assume that we have v2.81 installed?
Not really. It uses the gcc-2.8.x or egcs-1.1.x backend but can coexist peacefully with other versions of GCC.
Everything correct.
Have fun,
Peter
Hi again,
I wrote:
One remark: If you want GPC to compile C files (e.g. when compiling some parts of the standard units) it wants to have `cc1' etc. in its `/djgpp/lib/gcc-lib/.../' directory. So if you have the "wrong" version of GCC installed, you can kludge around by copying the files there.
Hope this helps,
Peter