GithubHelp home page GithubHelp logo

iOS文件编译设置 about wcdb HOT 6 CLOSED

tencent avatar tencent commented on May 17, 2024
iOS文件编译设置

from wcdb.

Comments (6)

312362115 avatar 312362115 commented on May 17, 2024

并且没办法在类似pch文件的地方引入 WCDB.h

from wcdb.

312362115 avatar 312362115 commented on May 17, 2024

如果一个class引入了WCDB.h, 并且这个class在所有地方都有用到, 会导致几乎整个app的.m文件都要改成.mm ??

from wcdb.

312362115 avatar 312362115 commented on May 17, 2024

xcode对于.mm文件的自动补全, 语法高亮太差了.
所以改成.mm之后, WCDB使用起来特别费劲

from wcdb.

RingoD avatar RingoD commented on May 17, 2024
  • .mm是对应Objective-C++代码文件后缀
    • 如果你在源文件里引用WCDB,则只需要将对应源文件的.m改为.mm
    • 如果你在头文件里引用WCDB,则需要将所有引用该头文件的源文件的.m改为.mm
    • 为了最小化你的修改,建议可以在头文件使用@WCTDatabase的语法,然后在源文件里再import WCDB。
    • 如果你必须在头文件里引用WCDB,建议用脚本批量修改文件名后缀。
  • Xcode对.mm的自动补全和语法高亮也是很好的。但你在刚修改完文件名后缀,可能xcode的索引还没有建完。可以等待其完成后再重启Xcode。如果依然没有高亮,可以删除~/Library/Developer/Xcode/DerivedData下对应project的数据后再试。

from wcdb.

312362115 avatar 312362115 commented on May 17, 2024

为了最小化你的修改,建议可以在头文件使用@WCTDatabase的语法,然后在源文件里再import WCDB。

WCTTableCoding.h WCTCodingMacro.h 这两个文件呢, 不是必须在model的头文件引入的嘛, 其他需要引入该model的, 也都必须改成.mm呀.

from wcdb.

RingoD avatar RingoD commented on May 17, 2024

这个看你代码结构怎么设计,Objective-C++的机制是需要改后缀的。

from wcdb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.