Creation of static libs with MS VC++ Toolkit 2003

From: Edd (eddNOSPAMHERE_at_nunswithguns.net)
Date: 05/30/04


Date: Sun, 30 May 2004 19:51:27 +0100

Hello,

I'm trying to create a static C library using the Microsoft Visual C++
Toolkit 2003. I'm hoping someone can help me with the necessary command line
options, as I'm not familiar with the VC++ system. I'm compiling my C code
files into object files with a command line similar to this:

cl /c /Tc somefile.c /O2 /Ot /Og /G7

This appears to work correctly, generating somefile.obj. I'm looking at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html
/_core_linker_reference.asp to find information on how to put several object
files into a .lib, but I can't see a way of doing this. The following
command line wants to link my objects into an executable:

link /OUT:somelib.lib somefile1.obj somefile2.obj

which isn't what I want as I get errors and so forth about not being able to
find the main() entry point.
I can't find the switch for library creation. Is there one, or should I be
taking a completely different approach?

Any help appreciated!

Edd



Relevant Pages

  • Re: j2me
    ... Here is the Hello world from Siemens wireless toolkit. ... protected void destroyApp ... Command againCommand = new Command(AGAIN_COMMAND_LABEL, ...
    (comp.lang.java.help)
  • Re: Visual C++ Toolkit - .dsw compile?
    ... Andreas Weller wrote: ... this toolkit contains the command line versions ... of their compiler paired with the runtime libraries. ...
    (comp.lang.cpp)
  • Re: Working with Visual C++ Toolkit 2003
    ... > This more or less forced me to take a look at the Visual C++ Toolkit ... The most painfull part will probably be the ressource editing. ... > you using makefiles, or are you typing a dozen of commands each time ... all I get is an error because the command cannot be found... ...
    (microsoft.public.vc.language)
  • Working with Visual C++ Toolkit 2003
    ... This more or less forced me to take a look at the Visual C++ Toolkit 2003. ... installation guide and tell you how to compile a "hello world" application. ... all I get is an error because the command cannot be found... ...
    (microsoft.public.vc.language)
  • Re: Excluding a lib from linking
    ... Concerning choice and inclusion of .lib files, it seems that the linker ... - the command line; ... Like you, i have tried the pragma directive with /nodefaultlib, without any ... I have a kind of solution, but it is necessary to remove the lib file in the ...
    (microsoft.public.vc.language)