VC++ 2005 Static Library

For all coding issues - MODers and programmers, HTML and more.

Moderators: Jeff250, fliptw

Post Reply
Disciple
DBB Ace
DBB Ace
Posts: 49
Joined: Sun Jan 05, 2003 3:01 am

VC++ 2005 Static Library

Post by Disciple » Tue Sep 18, 2007 10:43 am

Anybody know how to create one? I have been struggling all morning trying to figure out how to create a static library. There is not static library project template and I can't find references to static library creation in the help. Project requirements dictate that I cannot use DLLs or .NET stuff.

Thanks,
Any help appreciated ...
User avatar
Sedwick
DBB Ace
DBB Ace
Posts: 453
Joined: Mon May 14, 2007 8:30 am
Location: Waukesha, WI

Re: VC++ 2005 Static Library

Post by Sedwick » Tue Sep 18, 2007 9:38 pm

Disciple wrote:Project requirements dictate that I cannot use DLLs or .NET stuff....
Can't help you, but just curious--why not?
User avatar
Sirius
DBB Master
DBB Master
Posts: 5437
Joined: Fri May 28, 1999 2:01 am
Location: Bellevue, WA
Contact:

Post by Sirius » Wed Sep 19, 2007 11:05 pm

If the code you're talking about already exists and you want to convert it to a statically-linked library:
Right-click on the project in the solution explorer and click \"Properties\" (probably right down the bottom of the context menu)
Go to Configuration Properties -> General
First option under \"Project Defaults\" should be \"Configuration Type\". Change this from whatever it is to \"Static Library (.lib)\".

If you're creating a new one, use the Win32 Project option, follow the wizard, and when it asks you for a project type you should see \"Static Library\" listed. That side of things is pretty easy.

The biggest thing I can think of that could trip you up is if something I mentioned is missing from your version of VS2k5, but if you're using Express you shouldn't really be able to work on native-code projects without properly installing the extensions anyway.
Post Reply