Giter Site home page Giter Site logo

Comments (2)

hurley25 avatar hurley25 commented on July 20, 2024

是的,你说的没错,这里是有问题的。
可以这样做,将common.c的函数移到common.h里去,然后再加 static 就可以,即static inline,因为不加static的话,等价于所有包含了这个.h的文件都会有这个函数的定义,链接时可能会报重定义(有些未完全内联的情况),static之后作用域限制在文件内,符号(这里指函数名)对链接器不可见就没问题了。

P.S. 你可以fork下,然后改了提个merge request,我合并下。

from hurlex-doc.

hurley25 avatar hurley25 commented on July 20, 2024

移动到头文件里了,已修正,感谢指出问题。

from hurlex-doc.

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.