creating .dll and .lib files
-
How to create .dll and .lib files in a single build in VS2005. Is there any need to include some files for that ? Please help me.
-
How to create .dll and .lib files in a single build in VS2005. Is there any need to include some files for that ? Please help me.
What's your problem exactly ? Where are you stuck ? You need to create a dll project (New Project -> 'Visual C++' -> 'Win32' -> 'Win32 PRoject'). Click next and you'll be able to select DLL as application type. The library file will be generated automatically once you have at least one exported function.
Cédric Moonen Software developer
Charting control [v1.2 - Updated] -
What's your problem exactly ? Where are you stuck ? You need to create a dll project (New Project -> 'Visual C++' -> 'Win32' -> 'Win32 PRoject'). Click next and you'll be able to select DLL as application type. The library file will be generated automatically once you have at least one exported function.
Cédric Moonen Software developer
Charting control [v1.2 - Updated]Hi. Thanks for the reply. My problem is i am creating a new project in VS2005 from the existing project of VC6.0. It is not able to create the .lib automatically with the dll. I have checked all the settings of the project but could not get success. So i wanted to know whether any new thing has to be done in VS2005 while converting the old project to create dll ?
-
Hi. Thanks for the reply. My problem is i am creating a new project in VS2005 from the existing project of VC6.0. It is not able to create the .lib automatically with the dll. I have checked all the settings of the project but could not get success. So i wanted to know whether any new thing has to be done in VS2005 while converting the old project to create dll ?
Do you have at least one exported function ( one that is starting with
__declspec(dllexport)
) ? Did you use the conversion wizard to convert from the VC6 project to the VS2005 project ?
Cédric Moonen Software developer
Charting control [v1.2 - Updated] -
Do you have at least one exported function ( one that is starting with
__declspec(dllexport)
) ? Did you use the conversion wizard to convert from the VC6 project to the VS2005 project ?
Cédric Moonen Software developer
Charting control [v1.2 - Updated]Yes i have the following function with __declspec() #define SS_NOTHROW __declspec(nothrow) and yes. i have used the option File -> New -> Project from ExistingCode... option while creating
-
Yes i have the following function with __declspec() #define SS_NOTHROW __declspec(nothrow) and yes. i have used the option File -> New -> Project from ExistingCode... option while creating
Y K Kishore Kumar wrote:
#define SS_NOTHROW __declspec(nothrow)
First that's not a function and second, this macro doesn't even export a function. Just to make a test, add this piece of code to one of your header file:
int __declspec(dllexport) Test()
{
return 42;
}
Cédric Moonen Software developer
Charting control [v1.2 - Updated] -
Y K Kishore Kumar wrote:
#define SS_NOTHROW __declspec(nothrow)
First that's not a function and second, this macro doesn't even export a function. Just to make a test, add this piece of code to one of your header file:
int __declspec(dllexport) Test()
{
return 42;
}
Cédric Moonen Software developer
Charting control [v1.2 - Updated]Great. Its working now. thankyou very much. But can u please explain the scenario if u have time. ? Because some projects are working without this function. Once again thankyou verymuch. Kishore.
-
Great. Its working now. thankyou very much. But can u please explain the scenario if u have time. ? Because some projects are working without this function. Once again thankyou verymuch. Kishore.
Y K Kishore Kumar wrote:
Because some projects are working without this function.
You need to export at least one function so that the lib file will be generated. In your case, if no lib file is generated, it means that no function has been exported. So, it means that your dll is useless :-D (a dll that doesn't export anything is completely useless). If you need to add this function to have a lib file generated, then I think you have a problem.
Cédric Moonen Software developer
Charting control [v1.2 - Updated] -
Y K Kishore Kumar wrote:
Because some projects are working without this function.
You need to export at least one function so that the lib file will be generated. In your case, if no lib file is generated, it means that no function has been exported. So, it means that your dll is useless :-D (a dll that doesn't export anything is completely useless). If you need to add this function to have a lib file generated, then I think you have a problem.
Cédric Moonen Software developer
Charting control [v1.2 - Updated]OK. got it. thankyou very much once again.