www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/04/15:47:57

Date: Fri, 3 Feb 1995 14:17:31 -0400 (AST)
From: Bill Davidson <bdavidson AT ra DOT isisnet DOT com>
Subject: Re: DJGPP Under OS/2 Warp
To: scott_ankrum AT VNET DOT IBM DOT COM
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu


On Fri, 3 Feb 1995, T. Scott Ankrum wrote:

>     After all of those were unzipped under a directory called djgpp, I
> unzipped each of the four dj112m?.zip files, executing 112m?.bat after
> each one. Each of the bat files produced errors. (I executed them
> under DOS.) The first one could not find:
> 
>     LIBSRC\C\SYS\STAT_AST.S and LIBSRC\C\SYS\GETTIMEO.S

libsrc\c\sys\stat_ast.c comes in dj112m1.zip.  I no longer have the 
                      ^
112m1.bat file on my disk (I ran it then deleted it) but it must call gcc 
with the -S flag to generate a .s file or something.  Same thing applies 
to libsrc\c\sys\gettimeo.c.  First thing I would do is read the batch 
files to see what they do, and maybe eliminate any line that looks like 
@echo off, so all commands will appear on your screen.  That will make it 
easier to see where the errors occur.  Also, check your directory 
structure, make sure you didn't forget the -d switch on your unzipper 
(means create subdirs).

> 
>     All four of them produced the following error once or twice:
> 
> SYS3088: The name AR is not recognozed as an internal
> or external command, an operable program, or a batch file.
> 
What is your path?  (I don't know OS/2, but there must be an analogous 
command search path.)  ar is in your \djgpp\bin directory, it comes in 
bnu*.zip I think.  Make sure that directory is in your path, and make 
sure you have all the other necessary environment variables set correctly.

>     Each of them told me I could remove the objs and p_objs
> directories, but there is no p_objs directory.
> 
There should be.  Look for a bunch of .o files; where are they?

>     The file djgpp.env seemed to have more than I needed so I created
> an OS/2 .CMD file from it. I omitted the OBJC_ and OBJCPLUS_ includes.
> I also noticed that the subdirectory djgpp\include\sys was not listed
> so I added it to C_INCLUDE_PATH.
You are braver than I!  I wouldn't go messing with djgpp.env unless I was 
very sure I knew what I was doing.  I don't know what a .CMD file is, is 
it like a .bat file in DOS?  I think a bunch of the djgpp executables (or 
at least go32) look for that file to find needed information, and in fact 
you have to set an environment variable to point to it.
You don't need djgpp\include\sys in you include path; the files that need 
it point to it directly via #include <sys/whatever.h>.  the <> tells the 
C preprocessor to look in the include path for sys/whatever.h.

Be sure you are trying to execute the gccrm.exe (real mode compiler) 
instead of the PM compiler (that's protected mode, not Presentation 
Manager!); details are in the faq or readmes.

> what I think is a post-compile link, told me it could not find crt0.o
> which I could not find mentioned in my program. Also, its result was a
> file named for my program with no suffix.
crt0.o is the C start-up object file, analagous to the c0?.obj file for a 
DOS compiler.  It is used by all C and C++ programs; it is what calls 
main().  It comes in djdev112.zip, maybe in the maint releases.  It should 
be in your djgpp\lib directory.  Go look, see if it is there.  If not, see 
if you can find it, maybe in your djgpp directory (because you forgot 
the -d unzip switch?).  And yes, it is called by the linker (at least the 
compiler and linker are being called OK!).  Output from gcc is a filename 
with no suffix, and the file must be invoked like this:  
C:> go32 myprog
If you want a .exe you must run coff2exe.  All this is in the readmes and 
faq.  (RTFM?)

Hope this helps get you pointed in the right direction.  I definitely 
sounds like you have path/environment problems and/or directory structure 
problems.  Remember, the manuals are what you read when everything has gone 
wrong, and it seems to me you are approaching that state :-)
Bill Davidson
bdavidson AT ra DOT isisnet DOT com


- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019