I feel like an idiot asking such a basic question but for the life of me, I can't find much on this topic.
Anyway, how does one go about making a .lib file using Visual Studio (or whatever tool)?
Let's say I have a project or work space with one .cpp file and .obj in it.
TIA, Mike
Go to Project->Properties. Under "General" set "Configuration Type" to "Static Library (.lib)". Then under "Linker" change the extension of the Output File to .lib . Then you're good to go. Remember to do these for all your configurations (Debug, Release etc.)
To create a new static library project
From the File menu, select New and then Project….
On the Project types pane, under Visual C++, select Win32.
On the Templates pane, select Win32 Console Application.
Choose a name for the project, such as MathFuncsLib, and enter it in the Name field.
Choose a name for the solution, such as StaticLibrary, and enter it in the Solution Name field.
Press OK to start the Win32 application wizard. On the Overview page of the Win32 Application Wizard dialog box, press Next.
On the Application Settings page of the Win32 Application Wizard, under Application type, select Static library.
On the Application Settings page of the Win32 Application Wizard, under Additional options, clear the Precompiled header check box.
Press Finish to create the project.
See here for more details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With