Linking library without a header file?

前端 未结 4 2074
谎友^
谎友^ 2021-02-02 17:57

I\'m attempting to link a static library in C++ using Visual Studio 2010. Trouble is, the library (and accompanying header ) have a lot of MFC objects in them. I would like to c

4条回答
  •  一个人的身影
    2021-02-02 18:53

    A static library is the accumulation of one or more compiled modules. Each module can have dependencies on other modules, and some of those modules may be in other libraries.

    If the function you require is in a module that has no other dependencies, or whose dependencies are all contained within the current library, you can link it once you have created a proper function prototype. If there are additional dependencies then you're out of luck.

提交回复
热议问题