Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version
  1. first follow this to create prefix file (YourPrefixFileName.pch)
  2. add this code to your prefix file

    #ifdef __cplusplus
    #import <opencv2/opencv.hpp>
    #endif
    
    #ifndef YourProjectName_YourPrefixFileName_pch
    #define YourProjectName_YourPrefixFileName_pch
    
    // Include any system framework and library headers here that should be included in all compilation units.
    // You will also need to set the Prefix Header build setting of one or more of your targets to reference this file.
    
    #endif
    
  3. rename your ViewController's extension from .m (ViewController.m) to .mm (ViewController.mm)