But i'm getting error messages. I documented the problem below.
1. The code :
#include <stdio.h>
#include <Foundation/Foundation.h>
/*
* Declare the Test class
*
*/
@interface Test class
+(const char*) classStringValue;
@end
/*
* Implement Test class
*
*/
@implementation Test class
+(const char*) classStringValue;
{
return "This is the string of the Test Class";
}
@end
/*
* main function
*
*/
int main(void){
printf("%s\n",[Test classStringValue]);
return 0;
}
2. to make the file i'm using the commands (i'm running on openbsd 5.2 with ksh as shell) :
include $(GNUSTEP_MAKEFILES)/common.make
TOOL_NAME = LogTest
LogTest_OBJC_FILES = source2.m
include $(GNUSTEP_MAKEFILES)/tool.make
3. I get the following error message
This is gnustep-make 2.6.2. Type 'gmake print-gnustep-make-help' for help.
Running in gnustep-make version 2 strict mode.
Making all for tool LogTest...
Compiling file source2.m ...
source2.m:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+' token
source2.m:19: error: expected '=', ',', ';', 'asm' or '__attribute__' before '+' token
gmake[3]: *** [obj/LogTest.obj/source2.m.o] Error 1
gmake[2]: *** [internal-tool-all_] Error 2
gmake[1]: *** [LogTest.all.tool.variables] Error 2
gmake: *** [internal-all] Error 2