Using a DLL without .a file
I have create a DLL with a class in it with DevCpp.
But my project create also a .a file i have to link in the project of the program which use the DLL.
I want to create a libaray which can be use with all c++ compileur (DevCpp, MS Visual c++ and free Borland c++).
Is it possible to create and use a DLL without having to link a .a (or.lib) file?
And how?
Do you have a very simple example source code (because i am a beginner)?
Thanks.
Re: Using a DLL without .a file
Quote:
Originally posted by greg2
I have create a DLL with a class in it with DevCpp.
But my project create also a .a file i have to link in the project of the program which use the DLL.
I want to create a libaray which can be use with all c++ compileur (DevCpp, MS Visual c++ and free Borland c++).
Is it possible to create and use a DLL without having to link a .a (or.lib) file?
And how?
Do you have a very simple example source code (because i am a beginner)?
Thanks.
Here's some sample code using LoadLibrary() that XSquared said:
PHP Code:
HANDLE hDLL;
hDLL = LoadLibrary("file.dll");