使用code::blocks搭建objective-c的IDE开发环境 支持 @interface
网上有许多的关于 《使用code::blocks搭建objective-c的IDE开发环境》的文章。
大多是写了一个Helloworld 就结束了,今天试了试 添加了一个 @interface,就是加一个 .h 文件 和一个 .m文件。编译时报错
Project 结构:
main.m
1 #import <Foundation/Foundation.h> 2 #include "Person.h" 3 4 int main (int argc, const char *argv[]) 5 { 6 Person *person = [Person new]; 7 [person Printme :@"Windy" Age:34]; 8 9 return 0; 10 }
Person.h
1 #import <Foundation/Foundation.h> 2 @interface Person : NSObject 3 { 4 //TODO: 5 } 6 -(void) Printme :(NSString*) name Age:(int) age; 7 @end