[comp.sys.amiga.programmer] Help with SAS/C Compiler and macrodefs

laza@cip-s01.informatik.rwth-aachen.de (Alexander Lazarevic) (03/12/91)

I want to use the -d option of the compiler, to define a macro, in conjunction with the "-charakter.

eg. lc -d"lattice" -d3 -E test.c

This gives me:

Parameters beyond file name ignored.
Can't open source file.

Can anybody help me with this?

 /\
/--\lex.

markv@kuhub.cc.ukans.edu (03/12/91)

In article <laza.668711884@cip-s01>, laza@cip-s01.informatik.rwth-aachen.de (Alexander Lazarevic) writes:
> I want to use the -d option of the compiler, to define a macro, in conjunction with the "-charakter.
> 
> eg. lc -d"lattice" -d3 -E test.c
> 
> This gives me:
> 
> Parameters beyond file name ignored.
> Can't open source file.

Yes, the compiler sees the quotes as a file name.  Try:

	lc -dlattice -d3 -E test.c

Also, the ='s from of  -d cannot take a string for the define, so:

	lc -dlattice="Lattice"   ...

cant be done.  Only numeric/symbolic values can be used, although you
can get around that with something like:

#define	LATTICE "LATTICE"

..
	lc -dlattice=LATTICE

Also, (memory fails me), I think the -dEFINE needs to be a BIG d like:

	-Dlattice

> Can anybody help me with this?
> 
>  /\
> /--\lex.
-- 
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark Gooderum			Only...		\    Good Cheer !!!
Academic Computing Services	       ///	  \___________________________
University of Kansas		     ///  /|         __    _
Bix:	  mgooderum	      \\\  ///  /__| |\/| | | _   /_\  makes it
Bitnet:   MARKV@UKANVAX		\/\/  /    | |  | | |__| /   \ possible...
Internet: markv@kuhub.cc.ukans.edu
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

jseymour@medar.com (James Seymour) (03/12/91)

In article <laza.668711884@cip-s01> laza@cip-s01.informatik.rwth-aachen.de (Alexander Lazarevic) writes:
>I want to use the -d option of the compiler [...]

Uh...  It's -D<whatever> mon.  Note UPPERCASE "D", not lowercase.  And you
don't need the quotes.

-- 
Jim Seymour				| Medar, Inc.
...!uunet!medar!jseymour		| 38700 Grand River Ave.
jseymour@medar.com			| Farmington Hills, MI. 48331
CIS: 72730,1166  GEnie: jseymour	| FAX: (313)477-8897