How do I link this DLL Library? (I'm using DEVC++)

Hello,

I have a dll library that has a .def file included, but no .lib or .a files. So how can I use this to link this library with my project?

For Visual C++ and Borland, the package I'm using recommends doing this: http://www.fftw.org/install/windows.html

How would I do this using Dev C++? In the project settings, Dev C++ lets me add a library, but it has to be .a or .lib format. Can I convert the .def (which I have) to .lib or .a somehow??

Thanks!
read this on '.def' files ( http://msdn.microsoft.com/en-us/library/28d6s79h(VS.80).aspx ). they are not, and can not be converted to an actual library. moreover, think about what it is that you are asking. you have a Dynamic Link Library, '.lib' and '.a' are static libraries, therefore you have to have them at compile time. that is the whole point of having a DLL is that it is not required to compile the program, only to run it. the '.def' file provides information to the compiler about what functions/parts of the library you are able to use at run time. optionally, you can use function pointers and LoadLibrary()/FreeLibrary() to dynamically load/use the DLL at runtime, then there is no need for a '.def' file.

ps following are two msdn articles that should provide you with all the info you need on run-time vs load-time linking of DLL's, hope I have helped! :)

http://msdn.microsoft.com/en-us/library/ms686923(VS.85).aspx <-- load-time linking
http://msdn.microsoft.com/en-us/library/ms686944(VS.85).aspx <-- run-time linking
Last edited on
Topic archived. No new replies allowed.