RE: Visual studio 2003 .NET versus its own Command Prompt

From: Bonj (Bonj_at_discussions.microsoft.com)
Date: 12/14/04


Date: Tue, 14 Dec 2004 01:51:08 -0800


> As a follow-up to my previous message... I am a total C++ newbie, with
> quite a bit of OOP though (python). I have a Visual studio 2003 .NET
> package in the lab. When I installed and tried to run it, I got a
> message saying that the maximum # of licenses has been reached.

Microsoft have designed this wonderful thing called 'intellisense' - which
is the mechanism in Visual Studio whereby you start typing a line of code
and, hey presto, it gets completed *for you* ! Isn't that wonderful, you may
ask. In a business sense, yes - where the main priority is strictly to get
business-critical software up and running as quickly as possible. But it
could also be argued that MS are lulling developers into a false sense of
security - getting them 'addicted' to intellisense by making it easier and
easier to write a function call, and so that developers have to do less and
less, to such an extent that they're 'locked in' and have to keep using
intellisense as it's the only way they know how to program.
With me, using the IDE certainly makes me look in the documentation far
less. Which brings on the tendency to lazily use a function I don't know much
about by guessing its syntax, knowing that 99 times out of 100 that approach
will come up trumps. But by being forced to look up something in the
documentation, I find out more about it that I might not otherwise have
known, such as subtleties regarding how the parameters are handled for
instance.
Top and bottom of it is, I think there's an issue there in that using a
language via a strongly intellisensed IDE doesn't really encourage you to
learn much about the language. It makes it *too* easy, basically.

> I could
> easily buy more licenses,

You *could*... that would just lead to you having slightly less money, and
MS having slightly more...

> but since it would take some time, and I
> really wanted to start doing something, I tried using the command
> command line compiler which cames with it. The command command line
> compiler was working fine with Hello World programs, but failed when
> compiling a commercial code

It's probable that the commercial library uses functions exported from a DLL
that it #includes via an .h file, however those functions also need an import
library, which is a .lib file, for it to know where in the DLL the functions
are located, their calling convention, etc. for linking purposes. The likely
scenario is that you just haven't included this .lib file in the command
line. If you pass the name of the .lib file to cl.exe, then it will
automatically know that it isn't supposed to compile it and just pass it
straight on to the linker.

If you can find the .vcproj file that you got the code from, open it in
notepad and search for the text "AdditionalDependencies" - on one of my
projects it says
AdditionalDependencies="xyz.lib abc.lib" where xyz.lib and abc.lib are the
libraries it links into.

>
> Question(s):
> *What does the command line compiler lack, except for the graphical
> interface of the working package?

It lacks MFC (an abomination of a class library for building UI front-ends -
basically just C++'s sorry excuse for a RAD tool)
It also lacks ATL, which is *slightly* worth having as it's C++'s best
(only?) way of creating ActiveX controls and COM DLLs, but it is buggy.*
Other than that, the only thing it really lacks is the intellisense.

> Do you think that the LNK2019 error
> would not occur if I was using the whole package?
>

The LNK2019 error will not occur when you pass the dependent libraries
needed to the compiler. That may be able to happen as a result of using the
whole package, but it can just as easily happen without it.

*(yes, I can cite examples.)



Relevant Pages

  • Re: Visual studio 2003 .NET versus its own Command Prompt
    ... > package in the lab. ... > could easily buy more licenses, but since it would take some time, ... > command command line compiler which cames with it. ...
    (microsoft.public.vc.language)
  • Re: Imorting own packages in NetBeans
    ... the command import java.util.*;, etc. ... But if I create a Project which has a package called "thinking", ... Compiler gives a message ... "...cancel my subscription to the resurrection!" ...
    (comp.lang.java.help)
  • Visual studio 2003 .NET versus its own Command Prompt
    ... command line compiler which cames with it. ... rep and he said he could comile from the Visual Studio w no prob). ... interface of the working package? ...
    (microsoft.public.vc.language)
  • Re: Best compiler out there?
    ... the borland compiler is *very* up-to date... ... what I know) and distributed it as a command line tool. ... compiler package... ...
    (comp.lang.cpp)
  • Re: Ran ccmclean on site server, what are implications???
    ... i ran the synctool command line in a cmd running under system account using ... The sync tool only has to retrieve the files from the distribution share ... only created the package folder. ... baffles me that the advanced client that resides on the sms ...
    (microsoft.public.sms.setup)