[OSRS-PROJ] compile error on macos x
Alex Rice
alex_rice at arc.to
Tue Jul 16 22:41:07 PDT 2002
Howdy all, has anyone compiled PROJ.4 on Mac OS X? I'm running 10.1.5...
I ran into a little oddity and managed to fix the compile problem and
get the library installed, but have no idea why it was happening. I know
just enough C to get myself in trouble ;-).
Below was the error in geod.c. This was the only compile error. The fix
I came up with was to
reorder the includes in geod.c to the following. Anyone know why this
worked?
/* moved ctype.h above the others */
#include <ctype.h>
#include <string.h>
#include "projects.h"
#include <stdio.h>
#include "geodesic.h"
#include "emess.h"
The build error was:
cc -DHAVE_CONFIG_H -I. -I. -I. -DPROJ_LIB=\"/usr/local/share/proj\"
-g -O2 -c geod.c
/usr/include/ctype.h:128: syntax error, found `.'
/usr/include/ctype.h:128: illegal function definition, found `)'
/usr/include/ctype.h:130: illegal method selector, found `1'
/usr/include/ctype.h:131: illegal method definition, missing `{' after
`)'
/usr/include/ctype.h:135: syntax error, found `.'
/usr/include/ctype.h:135: illegal function definition, found `)'
/usr/include/ctype.h:137: illegal method selector, found `1'
/usr/include/ctype.h:138: illegal method definition, missing `{' after
`)'
cpp-precomp: warning: errors during smart preprocessing, retrying in
basic mode
In file included from geod.c:9:
/usr/include/ctype.h:128: parse error before `.'
/usr/include/ctype.h: In function `__istype':
/usr/include/ctype.h:130: `c' undeclared (first use in this function)
/usr/include/ctype.h:130: (Each undeclared identifier is reported only
once
/usr/include/ctype.h:130: for each function it appears in.)
/usr/include/ctype.h: At top level:
/usr/include/ctype.h:135: parse error before `.'
/usr/include/ctype.h: In function `__isctype':
/usr/include/ctype.h:137: `c' undeclared (first use in this function)
geod.c: In function `main':
geod.c:133: warning: return type of `main' is not `int'
make[1]: *** [geod.o] Error 1
Alex Rice, Software Developer
Architectural Research Consultants, Inc.
alex_rice at arc.to
alrice at swcp.com
----------------------------------------
PROJ.4 Discussion List
See http://www.remotesensing.org/proj for subscription, unsubscription
and other information.
More information about the Proj
mailing list