[comp.sys.apple2] NuLib problems

zane@ddsw1.MCS.COM (Sameer Parekh) (11/26/90)

	Some kind soul sent me NuLib, and after a fun experience untaring it,
I am unable to get it to compile.  It seems that nuadd.c has some errors in it.
	I have a UNIX System V/386 here.  My errors were, after doing a 
make >MakeResult I received the following on my terminal:

"nuadd.c", line 89: DIR undefined
"nuadd.c", line 89: dirp undefined
"nuadd.c", line 91: syntax error
"nuadd.c", line 113: nmlen undefined
"nuadd.c", line 117: dp undefined
"nuadd.c", line 118: warning: struct/union or struct/union pointer required
"nuadd.c", line 118: warning: struct/union or struct/union pointer required
"nuadd.c", line 120: d_namlen undefined
"nuadd.c", line 120: member of structure or union required
"nuadd.c", line 122: warning: struct/union or struct/union pointer required

Stop

The MakeResults file was the following:
	cc -O -c numain.c
	cc -O -c nuread.c
	cc -O -c nuview.c
	cc -O -c nuadd.c
*** Error code 1

	Any ideas on how to get it to compile?  I don't even want that
function.  The only reason I would use NuLib would be to unarchive some
things, not archive anything, I can do that on my GS.

	(This is version 3.01 of NuLib)

-- 
zane@ddsw1.MCS.COM

 
                                   

fadden@cory.Berkeley.EDU (Andy McFadden) (11/27/90)

This illustrates a common problem when porting NuLib, so I decided to post it.

In article <1990Nov26.024701.29900@ddsw1.MCS.COM> zane@ddsw1.MCS.COM (Sameer Parekh) writes:
>	I have a UNIX System V/386 here.

Try definining XENIX386 and see if that helps.  Is your system from SCO or
actual AT&T?

>	                                  My errors were, after doing a 
>make >MakeResult I received the following on my terminal:
>
>"nuadd.c", line 89: DIR undefined

The biggest portability problem in NuLib is the directory stuff.  At the
top of the file you should see:

# ifdef XENIX386
#  include <sys/ndir.h>         /* maybe <sys/ndir.h>, <dirent.h>, <dir.h>...*/
# else
#  include <sys/dir.h>
# endif

If sys/ndir.h doesn't do it for you, try the various other possibilities
until you get something that works.  One of those include files should
contain a definition for the DIR structure.

You may also need to include the -lx library; see the Makefile for details.

>	(This is version 3.01 of NuLib)

Version 3.02 has some minor bug fixes, notably some changes to the
MS-DOS .LNK and .MAK files.

>zane@ddsw1.MCS.COM

-- 
fadden@cory.berkeley.edu (Andy McFadden)
..!ucbvax!cory!fadden
fadden@hermes.berkeley.edu (when cory throws up)