Use of external C++ headers in Objective-C

前端 未结 5 1992
花落未央
花落未央 2020-12-13 19:40

In my iOS project I need to use an external library written in C++. The C++ header files are all in one directory.

I\'ve added these C++ headers to my Xcode project

5条回答
  •  眼角桃花
    2020-12-13 20:18

    my two cents for OSX / Mysql. (by the way I ask why that bogus use of <> in mysql... anyway..)

    As per Xcode 11 warning, "Disabling it is strongly recommended.",

    I prefer to patch another setting, leaving "Always Search User Paths" to "No".

    I set:

    HEADER_SEARCH_PATHS = "/usr/local/mysql/include".

    LINKER:

    I) If You got link error, add "libmysqlclient.a" usually in "/usr/local/mysql/lib", simply dragging from Finder)

    II: You can get a worst error...

    "/usr/local/lib/libmysqlclient.21.dylib: code signature in (/usr/local/lib/libmysqlclient.21.dylib) not valid for use in process using Library Validation: mapping process and mapped file (non-platform) have different Team IDs"

    As that lib is not signed. Simply in Entitlemens:

    (in XML): ..

    
        com.apple.security.cs.disable-library-validation
        
    
    ...
    

提交回复
热议问题