How do I link a DLL to my project? error LNK2019: unresolved external symbol

前端 未结 3 1471
太阳男子
太阳男子 2021-02-05 20:35

I have a file foo.h that has various declarations for functions. All of these functions are implemented in a file foo.dll. However, when I include th

3条回答
  •  遥遥无期
    2021-02-05 21:15

    1. You need to specify in front of function definitions __declspec(dllexport) keyword at the time of building the dll
    2. You need to import or load the .dll file into process memory.
    3. You need to acquire the address of function you want to use from that dll.

    Some useful links to get started:: MSDN Documentation, SO, Random

提交回复
热议问题