Can anyone tell me what #pragma does? I'm trying to write DLL's and I see examples using the line:
I know that if u include that line u can call functions from the dll file, but then i see some examples do this:
#pragma comment(lib, "theDLL.lib")
Can someone tell me the details of what is happening?
extern "C" __declspec(dllimport) void fuction_name( );
My book says #pragma is specifically for implementation defined options, so its affect will be described in your compiler documentation, and any #pragma directive that isn't recognized by the compiler will be ignored.
Declaring a variable as extern implies that it is defined somewhere outside the present scope.
As far as the details of the code you posted, I have no idea. :)
Here is the reference for all the MSVC pragma's.