Link to home
Start Free TrialLog in
Avatar of ranadhir
ranadhir

asked on

Urgent:static and dynamic linking of c-runtime

I am invoking a C win32 dll from a c++ client.
And i get a crash when i try to malloc memory in the dll,something like
extern "C" __declspec (dllexport) char* CreateString ()
{
   char* pString = (char*) malloc (16);
   strcpy (pString, "Hello, world");
   return pString;
}

Now i understand that the problem may be solved in the c-runtime is linked dynamically into the dll.Since i am not conversant with MS VC++ dev environment,can someone guide as to how I confirm the following
1.whether my DLL is statically/dynamically linked to C run-time.
2.How can i convert in to link dynamically,if it is not.
ASKER CERTIFIED SOLUTION
Avatar of alikoank
alikoank

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial