I have been working with Cocoa for a while, but this is my first
experience with GNUstep.
I am starting out by trying to port a fairly small command-line
application from OS X to Redhat Linux 3.2.2-5 (gcc 3.2.2)
I installed the latest distributions of gnustep base
(gnustep-base-1.9.0.tar), backend (gnustep-back-0.9.1.tar) and make
(gnustep-make-1.9.0.tar), and I am able to build some small test apps I
found in the docs. However, when I try to build my own application, I
get this when compiling main.m :
<...various warnings...>
main.m:285: warning: assignment discards qualifiers from pointer target
type
main.m:311: warning: passing arg 1 of `initWithFlatFile:andMolFile:'
discards qualifiers from pointer target type
main.m:311: warning: passing arg 2 of `initWithFlatFile:andMolFile:'
discards qualifiers from pointer target type
main.m:363: warning: assignment discards qualifiers from pointer target
type
/usr/include/bits/socket.h: At top level:
/usr/include/bits/socket.h:279: redefinition of `v'
/usr/include/bits/socket.h:279: `v' previously declared here
make[1]: *** [shared_obj/main.o] Error 1
make: *** [rayTrace.all.app.variables] Error 2
This application compiles and works fine under OS X. Thinking there
might be something funky with #import under linux, I wrapped my header
files in #ifndef's and switched to using #include. Same behavior.
I also started playing with the includes - in particular, I went through
and changed all #include <Foundation/Foundation.h> to
<Foundation/NSObject.h> which is adequate for some of my classes. This
results in the same sort of error, but now the final messages are
main.m:363: warning: `NSString' does not respond to `cString'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/objc/sarray.h: At top
level:
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/objc/sarray.h:235:
redefinition of `v'
/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/include/objc/sarray.h:235: `v'
previously declared here
make[1]: *** [shared_obj/main.o] Error 1
make: *** [rayTrace.all.app.variables] Error 2
Note same crap about "redefinition of `v'", but now in a different file.
Something really spurious is going on.