Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Managed C++ / November 2004

Tip: Looking for answers? Try searching our database.

generating static library

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Bonj - 07 Nov 2004 22:17 GMT
(using 2005 beta 1 SDK)
what tool is used to link static libraries?
I am trying to create a static library, but when I run
link /out:"project1.lib" project1.obj
it gives me 'could not open file 'project1.lib'' - as if it's thinking that
is an input file?
I can't use the /DLL option as then it will create a .dll, when I want to be
able to link all the functions into the app with all the code in the .lib
file, not the DLL.
I noticed there is also a tool called lib.exe - is this what I should be
using? However it is only in the Win64 folder of the SDK, so do I need to
download the VC2003 toolkit in order to get it?
Jeff Partch [MVP] - 08 Nov 2004 15:16 GMT
> (using 2005 beta 1 SDK)
> what tool is used to link static libraries?
[quoted text clipped - 8 lines]
> using? However it is only in the Win64 folder of the SDK, so do I need to
> download the VC2003 toolkit in order to get it?

Use lib.exe. The versions of link.exe that I have support an undocumented
/LIB switch that appears to just launch lib.exe by proxy.
Signature

Jeff Partch [VC++ MVP]

Bonj - 08 Nov 2004 16:01 GMT
That's great Jeff and good to know knowledge... I have tested it here on my
work computer and it works. But I have got Visual Studio at work...

On my home computer the only lib.exe is in the Win64 folder... so will it
still work do you think? I don't want to build a 64-bit program...

> > (using 2005 beta 1 SDK)
> > what tool is used to link static libraries?
[quoted text clipped - 13 lines]
> Use lib.exe. The versions of link.exe that I have support an undocumented
> /LIB switch that appears to just launch lib.exe by proxy.
Bonj - 08 Nov 2004 16:01 GMT
Is it an undocumented feature that lib.exe is part of the standard Visual
Studio, but not part of the free SDK other than for 64 bit programs?

I think I'm going to have about 9 DLLs for this program, so I'm happy to go
with DLLs. But if I'm ever building a program that doesn't need many "generic
components" and/or if most of the "generic components" are build specially
for that program, then I'll want to link it all in. And that's no matter
whether I'm building a C# or C++ program, or both (obviously if I want to
combine them I have to have a DLL...) but as a rule of thumb I say if there's
going to be more than 3 separate projects then I have them all as DLLs, if
not, then link in.

> > (using 2005 beta 1 SDK)
> > what tool is used to link static libraries?
[quoted text clipped - 13 lines]
> Use lib.exe. The versions of link.exe that I have support an undocumented
> /LIB switch that appears to just launch lib.exe by proxy.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.