-
#pragma ?
Can anyone tell me what #pragma does? I'm trying to write DLL's and I see examples using the line:
Code:
#pragma comment(lib, "theDLL.lib")
I know that if u include that line u can call functions from the dll file, but then i see some examples do this:
Code:
extern "C" __declspec(dllimport) void fuction_name( );
void funtion_name();
Can someone tell me the details of what is happening?
THX!
Dat
-
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.
Enjoy.
gg