How do I build an import library (.lib) AND a DLL in Visual C++?
- How do I build an import library (.lib) AND a DLL in Visual C++?
A Question:I want to have a single Visual Studio project that builds a DLL file and an import library (.lib) file. (An import library is a statically-linked library that takes care of loading that DLL file in other projects that use it).
So I went to Visual Studio C++ 2008 Express Edition, created a New Project of type Class Library, and set the "Configuration Type" to be "Dyanamic Library (.dll)".
But when I build the solution, the only relevant output file I see is a DLL file; I don't see any LIB file getting generated. I looked in the project directory and all subdirectories (Release and Debug).
Caveat: I just had this exact problem where my .lib file was not being generated. After googling through all info I could find about possible causes and carefully going through all the answers below I finally figured out that it was because my .cpp file didn't include my .h file. :( Just throwing it out here so that my comment could (with a small probability) help someone/myself if my stupid mistake is repeated in some distant future
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
This is a paragraph.
No comments:
Post a Comment