(resend with discuss-gnustep) 


So here's my make file: 

include $(GNUSTEP_MAKEFILES)/common.make 


TOOL_NAME = prog1 
prog1_OBJC_FILES = prog1.m 


include $(GNUSTEP_MAKEFILES)/tool.make 


several errors again.. 
$make message=yes 
this is gnustep-make 2.4.0.... 
making all for tool prog1... 
compiling file prog1.m... 
prog1.m: In function 'main' : 
prog1.m:5: error: expected ',' or ';' before 'init' 
prog1.m:8: error: 'pool' undeclared (first use in this function) 
prog1.m:8: error: (each undeclared identifier is reported only once 
" " " for each function it appears in.) 
prog1.m:5: warning: unused variable 'Pool' 
make [3]: *** [obj/prog1.obj/prog1.m.o] Error 1 
make [2]: *** [internal-tool-all_] error 2 
make [1]: *** [prog1.all.tool.variables] Error 2 
make: *** [internal-all] Error 2 


thanks again, 
chris 







Hi CBW, 

I see that you are using plain GCC to compile. 
The easiest way of doing development on windows is to use the GNUstep 
Make package instead 
( 
http://www.gnustep.org/resources/documentation/Developer/Make/Manual/make.html) 
. 

Basically (you might already done some of these steps, just added for 
completeness) 
1. Ensure that make, base, bui and back are installed by using the 
installers from here: http://www.gnustep.org/experience/Windows.html 
2. Create a GNUMakefile in the directory where your main.m lives 
according to the make documentation, i.e. 

# 
# An example GNUmakefile 
# 

# Include the common variables defined by the Makefile Package 
include $(GNUSTEP_MAKEFILES)/common.make 

# Build a simple Objective-C program 
TOOL_NAME = prog1 

# The Objective-C files to compile 
prog1_OBJC_FILES = prog1.m 

-include GNUmakefile.preamble 
# Include in the rules for making GNUstep command-line programs 
include $(GNUSTEP_MAKEFILES)/tool.make 
-include GNUmakefile.postamble 

3. Ensure that GNUstep.sh is sources by typing 'env | grep GNU' 
You should see a lot of "GNUSTEP_XXXX_XXX" variable defined. 
If they are not defined (which they really should be with after using 
the windows installer) - you need to source the GNUstep.sh file like 
this: 

. /usr/GNUstep/System/Library/Makefiles/GNUstep.sh 

4. Type 'make' and see that it starts building. 
Then to "install" it, type 'make install' followed by 'make clean' 

5. If you run into any issues, type "make message=yes" and capture 
output, that makes it easier to troubleshoot. 

Best regards, 
Tim 

On Mon, Nov 29, 2010 at 7:07 AM, < [email protected] > wrote: 
> 
> Using a programming book, one of the exercises has me try 
> #import <Foundation/Foundation.h> 
> int main(int argc, const char * argv[]) 
> { 
> NSAutoreleasePool * Pool = [NSAutoreleasePool alloc] init]; 
> NSLog (@"programming is fun"); 
> [pool drain]; 
> return 0; 
> } 
> // i am using Windows vista, GNUstep to compile, and jEdit to enter the data. 
> i get these errors from GNUstep 
> $ gcc -o run prog1.m 
> prog1.m:1:34: error: Foundation/Foundation.h: No such file or directory 
> prog1.m: In function 'main' : 
> prog1.m:5: error: 'NSAutoreleasePool' undeclared (first use in this function) 
> prog1.m:5: error: (Each undeclared identifier is reported only once 
> prog1.m:5: error: for each function it appears in.) 
> prog1.m:5: error: 'Pool' undeclared (first use in this function) 
> prog1.m:5: error: expected ';' before 'init' 
> prog1.m:5: error: expected statement before ']' token 
> prog1.m:5: error: cannot find interface declaration for 'NXConstantString' 
> prog1.m:5: error: 'pool' undeclared (first use in this function) 
> 
> //thanks for any help anyone can provide! ! 
> _______________________________________________ 
> Discuss-gnustep mailing list 
> [email protected] 
> http://lists.gnu.org/mailman/listinfo/discuss-gnustep 
> 
_______________________________________________
Discuss-gnustep mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to