{"id":38,"date":"2004-12-31T21:35:53","date_gmt":"2004-12-31T21:35:53","guid":{"rendered":"http:\/\/www.cclo.idv.tw:8080\/blogs\/wordpress\/?p=38"},"modified":"2004-12-31T21:35:53","modified_gmt":"2004-12-31T21:35:53","slug":"_windows_objectivec","status":"publish","type":"post","link":"https:\/\/blog.cclo.idv.tw\/?p=38","title":{"rendered":"\u5728 Windows \u4e0b\u7de8\u8b6f Objective-C \u6ce8\u610f\u4e8b\u9805"},"content":{"rendered":"<p>\u9019\u7bc7\u6587\u7ae0\u5c07\u6703\u4ecb\u7d39\u5982\u4f55\u5728 MS-Windows \u7cfb\u7d71\u4e2d\u5229\u7528 GNUstep \u7de8\u8b6f Objective-C \u7684\u7a0b\u5f0f\u3002<\/p>\n<p>\n\u975e\u6280\u8853\u4eba\u54e1\uff0c\u6216\u662f\u5c0d Objective-C \u6c92\u6709\u8208\u8da3\u7684\u4eba\u53ef\u4ee5\u8df3\u904e\u3002 ^^;<\/p>\n<p><!--more--><\/p>\n<hr>\n<ol>\u4f7f\u7528 msys \u7de8\u8b6f\u7684\u65b9\u6cd5\uff1a<\/p>\n<li>\u9996\u5148\u81f3 <a href=\"http:\/\/www.gnustep.org\">GNUstep \u7684\u7db2\u7ad9<\/a>\u4e0b\u8f09<a href=\"ftp:\/\/ftp.gnustep.org\/pub\/gnustep\/binaries\/windows\">\u6700\u65b0\u7684 installer<\/a>\u3002\uff08\u4e0b\u8f09\u7248\u865f\u6700\u65b0\u7684\u57f7\u884c\u6a94\u5c31\u53ef\u4ee5\u4e86\uff09<\/li>\n<li>\u5b89\u88dd installer\u3002\uff08\u4ee5\u4e0b\u8aaa\u660e\u5047\u8a2d GNUstep \u662f\u88dd\u5728 C:GNUstep \u9019\u500b\u76ee\u9304\u4e0b\uff09<\/li>\n<li>\u958b\u555f msys\u3002\n<li>\u5728 home directory \u4e0b\u958b\u4e00\u500b\u53eb\u505a .profile \u7684\u6a94\u6848\uff0c\u88e1\u9762\u653e\u9019\u5169\u884c\u8a2d\u5b9a\uff1a\n<pre>\nexport OBJC_INCLUDE_PATH=\/c\/GNUstep\/System\/Library\/Headers\/\nexport LIBRARY_PATH=\/c\/GNUstep\/Library\/Libraries\/\n<\/pre>\n<p>\u8aaa\u660e\uff1a\u9019\u5169\u884c\u662f\u5728\u8a2d\u5b9a\u74b0\u5883\u8b8a\u6578\uff0c\u5206\u5225\u662f\u8a2d\u5b9a Objcective-C \u7684 header files \u7684\u4f4d\u7f6e\uff0c\u4ee5\u53ca library \u7684\u4f4d\u7f6e\u3002GCC \u6703\u6839\u64da\u9019\u5169\u500b\u8def\u5f91\u53bb\u641c\u5c0b header files &amp; libraries\u3002\n<\/li>\n<li>\u91cd\u65b0\u958b\u555f msys\uff0c\u6216\u662f\u5728\u547d\u4ee4\u5217\u57f7\u884c\u4e0b\u9762\u7684\u547d\u4ee4\uff1a\n<pre>\nsource ~\/.profile\n<\/pre>\n<\/li>\n<li>\u73fe\u5728\u4f60\u53ef\u4ee5\u7de8\u8b6f\u4e86\u3002\u8a18\u5f97\u5728 link \u7684\u6642\u5019\u5fc5\u9808\u6307\u5b9a\u8981 link objc \u548c gnustep-base \u7b49\u5169\u500b libraries:<br \/>\n<\/p>\n<pre>\ngcc -o test.exe test.m -lobjc -lgnustep-base\n<\/pre>\n<\/li>\n<\/ol>\n<hr>\n<ol>\u4f7f\u7528 cmd.exe\uff08\u547d\u4ee4\u63d0\u793a\u5b57\u5143\uff09\u7de8\u8b6f\u53ca\u57f7\u884c\u7de8\u8b6f\u7d50\u679c\uff1a<\/p>\n<li>\u4f9d\u64da\u524d\u9762\u7684\u6b65\u9a5f 1. 2. \u5b89\u88dd GNUstep \u5957\u4ef6\u3002<\/li>\n<li>\n\u300c\u958b\u59cb\u2192\u63a7\u5236\u53f0\u2192\u7cfb\u7d71\u2192\u9032\u968e\u2192\u74b0\u5883\u8b8a\u6578\u300d\uff08\u4ee5 Windows XP \u70ba\u4f8b\uff09\n<\/li>\n<li>\n\u5728 Path \u74b0\u5883\u8b8a\u6578\u4e2d\uff0c\u589e\u52a0\u4ee5\u4e0b\u5169\u500b\u76ee\u9304\uff1a<\/p>\n<pre>\nC:GNUstepDevelopmentmsys1.0mingwbin\nC:GNUstepSystemTools\n<\/pre>\n<p>\u524d\u8005\u662f\u70ba\u4e86\u80fd\u57f7\u884c gcc\uff0c\u5f8c\u8005\u662f\u70ba\u4e86 gnustep-base.dll\u3002\uff08\u7576\u7136\uff0c\u628a gnustep-base.dll \u653e\u5230 WindowsSystem \u4e0b\u9762\u4e5f\u53ef\u4ee5\uff09\n<\/li>\n<li>\n\u589e\u52a0\u4e00\u500b\u74b0\u5883\u8b8a\u6578 OBJC_INCLUDE_PATH\uff0c\u5176\u503c\u70ba C:GNUstepSystemLibraryHeaders\u3002\n<\/li>\n<li>\n\u589e\u52a0\u4e00\u500b\u74b0\u5883\u8b8a\u6578 LIBRARY_PATH\uff0c\u5176\u503c\u70ba C:GNUstepSystemLibraryLibraries\u3002<\/p>\n<p>\n\u589e\u52a0\u4e0a\u8ff0\u9019\u5169\u9805\u7684\u7406\u7531\u548c\u524d\u9762 msys \u7684 4. \u76f8\u540c\u3002\n<\/li>\n<li>\n\u73fe\u5728\u4f60\u4e5f\u53ef\u4ee5\u5728 cmd \u4e0b\u7de8\u8b6f\u4e86\uff0c\u8a9e\u6cd5\u548c msys \u4e0b\u76f8\u540c\u3002\n<\/li>\n<\/ol>\n<hr>\n<ul>\u53c3\u8003\u6587\u4ef6\uff1a<\/p>\n<li><a href=\"ftp:\/\/rtfm.mit.edu\/pub\/faqs\/computer-lang\/Objective-C\/faq\">comp.lang.objective-C FAQ<\/a> -- David Stes<\/li>\n<li><a href=\"http:\/\/www.gnu.org\/software\/gcc\/onlinedocs\/\">GCC Online Manual<\/a> -- Free Software Foundation<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>\u9019\u7bc7\u6587\u7ae0\u5c07\u6703\u4ecb\u7d39\u5982\u4f55\u5728 MS-Windows \u7cfb\u7d71\u4e2d\u5229\u7528 GNUstep \u7de8\u8b6f Objective-C \u7684\u7a0b\u5f0f [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[13],"tags":[],"table_tags":[],"class_list":["post-38","post","type-post","status-publish","format-standard","hentry","category--computer-science"],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/38","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=38"}],"version-history":[{"count":0,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=\/wp\/v2\/posts\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=38"},{"taxonomy":"table_tags","embeddable":true,"href":"https:\/\/blog.cclo.idv.tw\/index.php?rest_route=%2Fwp%2Fv2%2Ftable_tags&post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}