윈도 환경에서 sublime text2를 사용해 Objective-C 파일을 컴파일하고 실행하는데 성공~
GNUSTEP for Windows 설치하였고, 빌드 시스템 설정 소스는 아래와 같음.
컴파일러를 GCC –> LLVM으로 변경하면서 프론트엔드가 clang으로 변경되었음.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": ["clang", "-ObjC", "${file}", "-fobjc-arc", "-fblocks", "-framework", "Foundation", "-o", "${file_base_name}"], | |
"file_regex": "^(.*?):([0-9]+):([0-9]+): (.*)", | |
"selector": "source.m", | |
"variants": [ | |
{ | |
"name": "Run", | |
"cmd": ["${file_path}/${file_base_name}"] | |
}, | |
{ | |
"name": "Compile", | |
"cmd" : [ "clang", "-c", "${file}", "-ObjC", "-fblocks", "-fobjc-arc"] | |
}, | |
{ | |
"cmd": ["clang", ,"-g", "-ObjC", "${file}", "-fobjc-arc", "-fblocks", "-framework", "Foundation", "-o", "${file_base_name}"], | |
"name" : "Build for Debug" | |
}, | |
{ | |
"name": "Analyze", | |
"cmd" : [ "clang", "-c", "${file}", "-ObjC", "-fobjc-arc", "-fblocks", "–analyze"] | |
}, | |
{ | |
"name" : "Link-All", | |
"cmd" : ["bash", "-c", "clang *.o -o ${file_path}/${file_base_name} -ObjC -fblocks, -framework Foundation -fblock"] | |
}, | |
{ | |
"name" : "Build-All", | |
"path" : "/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Users/sooop/bin:", | |
"cmd" : ["scc"] | |
}, | |
{ | |
"name" : "Run Output", | |
"cmd" : ["${file_path}/${file_base_name}"] | |
} | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cmd": [ | |
"c:/apps/clang/bin/clang.exe", "${file}", "-ObjC", | |
"-o", "${file_path}/${file_base_name}", | |
"-I" ,"C:/GNUstep/GNUstep/System/Library/Headers", | |
"-I" ,"C:/GNUstep/include", | |
"-L", "C:/GNUstep/GNUstep/System/Library/Libraries", | |
"-lobjc" , | |
"-fobjc-default-synthesize-properties", | |
"-lgnustep-base", | |
"-fblocks" | |
], | |
"file_regex": "^(..[^:]*):([0-9]+):?([0-9]+)?:? (.*)$", | |
"working_dir": "${file_path}", | |
"selector": "source.m", | |
"variants": | |
[ | |
{ | |
"name": "Run", | |
"cmd": ["${file_path}/${file_base_name}"] | |
}, | |
{ | |
"cmd": [ | |
"c:/apps/clang/bin/clang.exe", "${file}", | |
"–analyze", | |
"-ObjC", | |
"-I" ,"C:/GNUstep/GNUstep/System/Library/Headers", | |
"-I" ,"C:/GNUstep/include", | |
//"-fobjc-default-synthesize-properties", | |
"-fblocks" | |
], | |
"name" : "Analyze" | |
}, | |
{ | |
"cmd": [ | |
"c:/apps/clang/bin/clang.exe", "${file}", | |
"-c", | |
"-ObjC", | |
"-I" ,"C:/GNUstep/GNUstep/System/Library/Headers", | |
"-I" ,"C:/GNUstep/include", | |
"-fobjc-default-synthesize-properties", | |
"-fblocks" | |
], | |
"name" : "Compile" | |
}, | |
{ | |
"cmd" : ["c:/apps/clang/bin/clang.exe", "${file_path}/*.o" , "-o", "${file_base_name}", | |
"-lobjc" , "-lgnustep-base", | |
"-L", "C:/GNUstep/GNUstep/System/Library/Libraries"], | |
"name" : "Link-All" | |
}, | |
{ | |
"cmd": ["c:/apps/bin/scc.exe"], | |
"name" : "Build-All" | |
}, | |
{ | |
"cmd" : ["${file_path}/run.exe"], | |
"name" : "Run output" | |
}, | |
{ | |
"cmd" : ["cmd","/c","del", "*.o", "*.exe"], | |
"name" : "Clean Project" | |
}, | |
{ | |
"cmd": [ | |
"c:/apps/clang/bin/clang.exe", "${file}", "-ObjC", "-g", | |
"-o", "${file_path}/${file_base_name}", | |
"-I" ,"C:/GNUstep/GNUstep/System/Library/Headers", | |
"-I" ,"C:/GNUstep/include", | |
"-L", "C:/GNUstep/GNUstep/System/Library/Libraries", | |
"-lobjc" , | |
"-fobjc-default-synthesize-properties", | |
"-lgnustep-base", | |
"-fblocks" | |
], | |
"name" : "Build for Debug" | |
} | |
] | |
} |