Linking library without a header file?

前端 未结 4 2059
谎友^
谎友^ 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:41

    For example if you have want ot call timeGetTime and you have a reason not to include mmsystem.h because of some conflicts, you can do this:

    extern "C" DWORD WINAPI timeGetTime(void);
    #pragma comment(lib, "winmm.lib")
    

提交回复
热议问题