help-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Trouble compiling command-line application


From: zauhar
Subject: Trouble compiling command-line application
Date: Tue, 24 Feb 2004 12:07:32 -0500


Hi folks,

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.

If anyone has advice I would be grateful!

Randy


Randy J. Zauhar, PhD
Assoc. Prof. of Biochemistry
Director, Graduate Program in Bioinformatics
Dept. of Chemistry & Biochemistry
University of the Sciences in Philadelphia
600 S. 43rd Street
Philadelphia, PA 19104

Phone:  (215)596-8691
FAX:            (215)596-8543
E-mail: r.zauhar@usip.edu
Web:    http://tonga.usip.edu/zauhar


Discussion after watching Disney's "Lilo & Stitch":

DAD: "But why did the space aliens speak English, as opposed to French, or Swahili? And why did the one alien speak English with an Eastern European accent? I don't get it."

CATHERINE (age 7): "That's 'cause you don't have a good cartoon brain."





reply via email to

[Prev in Thread] Current Thread [Next in Thread]