{"id":1542,"date":"2017-06-26T20:29:56","date_gmt":"2017-06-26T11:29:56","guid":{"rendered":"http:\/\/www.chihayafuru.jp\/tech\/?p=1542"},"modified":"2017-06-26T20:31:35","modified_gmt":"2017-06-26T11:31:35","slug":"xcode%e3%81%a7opencv%e3%81%ae%e3%82%b3%e3%83%b3%e3%83%91%e3%82%a4%e3%83%ab%e3%82%a8%e3%83%a9%e3%83%bc","status":"publish","type":"post","link":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/archives\/1542","title":{"rendered":"Xcode\u3067OpenCV\u306e\u30b3\u30f3\u30d1\u30a4\u30eb\u30a8\u30e9\u30fc"},"content":{"rendered":"<h2>\u30a8\u30e9\u30fc\u5185\u5bb9<\/h2>\n<pre class=\"lang:default highlight:0 decode:true \" >enum { NO, GAIN, GAIN_BLOCKS };\r\n<\/pre>\n<p>\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb(*.hpp)\u306b\u304a\u3044\u3066 <font color=\"red\">&quot;Expected Identifier&quot;<\/font> \u304c\u767a\u751f\u3059\u308b\u3002<\/p>\n<p>\u76f4\u524d\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3067\u4ee5\u4e0b\u306e\u8b66\u544a(Warning)\u304c\u767a\u751f\u3057\u3066\u3044\u308b\u3002<\/p>\n<pre class=\"lang:default highlight:0 decode:true \" >#if defined(NO)\r\n#  warning Detected Apple 'NO' macro definition, it can cause build conflicts. Please, include this header before any Apple headers.\r\n#endif<\/pre>\n<h3>\u610f\u8a33<\/h3>\n<p>Apple (Xcode) \u304c\u63d0\u4f9b\u3059\u308b\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u306b\u304a\u3044\u3066 &quot;NO&quot; \u304c\u5b9a\u7fa9\u3055\u308c\u308b\u524d\u306b\u3001OpenCV\u306e\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u5148\u306b\u8aad\u307f\u8fbc\u3093\u3067 &quotNO;&quot; \u3092\u5b9a\u7fa9\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<br \/>\n<!--more--><\/p>\n<p>&nbsp;<\/p>\n<h2>\u3010\u30b1\u30fc\u30b9\uff11\u3011 Pre-Compile Header (YourProject-Prefix.pch) \u304c\u5b58\u5728\u3059\u308b<\/h2>\n<p>Pre-Compile Header\u306f\u3001\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u306b\u8a18\u8ff0\u3057\u305finclude\u6587\u3088\u308a\u5148\u306b\u8aad\u307f\u8fbc\u307e\u308c\u308b\u305f\u3081\u3001\u3053\u3053\u3067OpenCV\u306e\u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb\u3092\u5148\u99c6\u3051\u3066\u8aad\u307f\u8fbc\u3080\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n<p>YourProject-prefix.pch\u306e\u4e2d\u3067Apple\u306eInclude\u30d5\u30a1\u30a4\u30eb\u3092\u8aad\u307f\u8fbc\u3080\u524d\u306bOpenCV\u306e\u30d8\u30c3\u30c0\u30fc\u3092\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u3059\u308b\u3002<\/p>\n<pre class=\"lang:default highlight:0 decode:true \" >#ifdef __cplusplus\r\n#include <opencv2\/opencv.hpp>\r\n#endif<\/pre>\n<h3>\u8a18\u8ff0\uff08\u633f\u5165\uff09\u4f8b<\/h3>\n<pre class=\"lang:default highlight:0 decode:true \" >\/\/\r\n\/\/ Prefix header for all source files of the 'YourAppName' target in the 'YourProjectName' project\r\n\/\/\r\n\r\n#import <Availability.h>\r\n\r\n#ifndef __IPHONE_4_0\r\n#warning \"This project uses features only available in iOS SDK 4.0 and later.\"\r\n#endif\r\n\r\n#ifdef __cplusplus\r\n#include <opencv2\/opencv.hpp>\r\n#endif\r\n\r\n#ifdef __OBJC__\r\n\t#import <UIKit\/UIKit.h>\r\n\t#import <Foundation\/Foundation.h>\r\n#endif\r\n\r\n#import \"Defs.h\"<\/pre>\n<h4>\u88dc\u8db3<\/h4>\n<p>Xcode5\u307e\u3067\u306f\u3001\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u65b0\u898f\u4f5c\u6210\u6642\u306b *-Prefix.pch \u304c\u81ea\u52d5\u751f\u6210\u3001\u81ea\u52d5\u767b\u9332\u3055\u308c\u3066\u3044\u305f\u304c\u3001Xcode6\u4ee5\u964d\u3067\u306f\u660e\u793a\u7684\u306b\u4f5c\u6210\u3057\u306a\u3044\u9650\u308a *-Prefix.pch \u306f\u5b58\u5728\u3057\u306a\u3044\u3002\u30b1\u30fc\u30b9\uff11\u306b\u8a72\u5f53\u3059\u308b\u306e\u306f\u3001(\u304a\u305d\u3089\u304f)Xcode5\u4ee5\u524d\u306b\u4f5c\u6210\u3055\u308c\u305fXcode\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u3060\u3051\u3042\u308b\u3002<\/p>\n<p>&nbsp;<\/p>\n<h2>\u3010\u30b1\u30fc\u30b9\uff12\u3011 Pre-Compile Header (YourProject-Prefix.pch) \u304c\u5b58\u5728\u3057\u306a\u3044<\/h2>\n<p>\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9(*.m, *.h, *.cpp, *.hpp\u306a\u3069)\uff11\u3064\uff11\u3064\u3067 opencv.hpp \u306e\u30a4\u30f3\u30af\u30eb\u30fc\u30c9\u6587\u3092\u524d\u306b\u79fb\u52d5\u3055\u305b\u308b<\/p>\n<h3>\u4fee\u6b63\u524d\u306e\u4f8b<\/h3>\n<pre class=\"lang:default highlight:0 decode:true \" >#import <Foundation\/Foundation.h>\r\n#import <opencv2\/opencv.hpp><\/pre>\n<h3>\u4fee\u6b63\u5f8c\u306e\u4f8b<\/h3>\n<pre class=\"lang:default highlight:0 decode:true \" >#import <opencv2\/opencv.hpp>\r\n#import <Foundation\/Foundation.h><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u30a8\u30e9\u30fc\u5185\u5bb9 enum { NO, GAIN, GAIN_BLOCKS }; \u30d8\u30c3\u30c0\u30fc\u30d5\u30a1\u30a4\u30eb(*.hpp)\u306b\u304a\u3044\u3066 &quot;Expected Identifier&quot; \u304c\u767a\u751f\u3059\u308b\u3002 \u76f4\u524d\u306e\u30bd\u30fc\u30b9\u30b3\u30fc\u30c9\u3067\u4ee5\u4e0b\u306e [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[50,11],"class_list":["post-1542","post","type-post","status-publish","format-standard","hentry","category-memo","tag-opencv","tag-xcode"],"_links":{"self":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1542","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/comments?post=1542"}],"version-history":[{"count":16,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1542\/revisions"}],"predecessor-version":[{"id":1558,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/posts\/1542\/revisions\/1558"}],"wp:attachment":[{"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/media?parent=1542"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/categories?post=1542"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chihayafuru.jp\/tech\/index.php\/wp-json\/wp\/v2\/tags?post=1542"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}