{"id":1222,"date":"2014-02-26T15:23:17","date_gmt":"2014-02-26T07:23:17","guid":{"rendered":"http:\/\/www.magicandlove.com\/blog\/?p=1222"},"modified":"2014-02-26T15:23:17","modified_gmt":"2014-02-26T07:23:17","slug":"build-opencv-2-4-8-in-mac-osx-10-9","status":"publish","type":"post","link":"http:\/\/www.magicandlove.com\/blog\/2014\/02\/26\/build-opencv-2-4-8-in-mac-osx-10-9\/","title":{"rendered":"Build OpenCV 2.4.8 in Mac OSX 10.9"},"content":{"rendered":"<p>My <a href=\"http:\/\/www.magicandlove.com\/blog\/2013\/07\/19\/build-opencv-on-mac-osx\/\">former post<\/a> described the steps to build OpenCV from source in OSX. With OSX 10.9 and the latest Xcode 5.0.2, there are changes before I can build the OpenCV again. I refer to <a href=\"http:\/\/stackoverflow.com\/questions\/19626854\/opencv-cuda-osx-maverick\">this post<\/a> for the building process.<\/p>\n<p>In this configuration, I do not need to specify in the <strong>ccmake<\/strong> command line the C and CXX compiler. For machine with CUDA, I use \/usr\/bin\/clang for the CUDA_HOST_COMPILER option. After the generation phase of the <strong>ccmake<\/strong> process, I manually edit the <strong>CMakeCache.txt<\/strong> file to alter some more options.<\/p>\n<p>For CUDA_NVCC_FLAGS, the options are -Xcompiler -stdlib=libstdc++; -Xlinker -stdlib=libstdc++<\/p>\n<p>For CMAKE_CXX_FLAGS and CMAKE_EXE_LINKER_FLAGS, the option is -stdlib=libstdc++<\/p>\n<p>The second option will instruct the build process not to use the new C++11 library that may cause compilation errors in <a href=\"http:\/\/openframeworks.cc\">openFrameworks<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>My former post described the steps to build OpenCV from source in OSX. With OSX 10.9 and the latest Xcode 5.0.2, there are changes before I can build the OpenCV again. I refer to this post for the building process. In this configuration, I do not need to specify in the ccmake command line the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79],"tags":[],"class_list":["post-1222","post","type-post","status-publish","format-standard","hentry","category-software-2"],"_links":{"self":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts\/1222","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/comments?post=1222"}],"version-history":[{"count":1,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts\/1222\/revisions"}],"predecessor-version":[{"id":1223,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/posts\/1222\/revisions\/1223"}],"wp:attachment":[{"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/media?parent=1222"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/categories?post=1222"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.magicandlove.com\/blog\/wp-json\/wp\/v2\/tags?post=1222"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}