There are various ways to export functions from a dll and __declspec(dllexport) is only one of them. For example, functions can be exported using module definition files containing the EXPORTS statement. See Exporting from a DLL Using DEF Files
Why can I link functions in the GFLW dynamic link library when this function is not modified with __declspec(dllexport)?
冬天配地瓜
0
Reputation points
I added a preprocessor in visual studio, that is, #define GLFWAPI
, and then when I ran my program, I found that the program was able to link to the function GLFWAPI int glfwGetKeyScancode(int key)
. I learned from the official website that any other functions in the DLL are private functions of the DLL, but I clearly did not define GLFWAPI as __declspec(dllexport), that is, #define GLFWAPI __declspec(dllexport)
. Why can my program still link the glfwGetKeyScancode
function?
Developer technologies | C++
3,977 questions