Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

command-line compile problems

Status
Not open for further replies.

DoraC

Programmer
Joined
May 7, 2002
Messages
98
Location
US
Hi,

I'm trying to use VC++ 98 to compile from the DOS command line (on a Windows 2000 desktop), and am having some difficulties.

I type in the following string:

Code:
C:\projects\software\library\disc\c++\hello world>CL /EHsc -I"c:\Program Files\M
icrosoft Visual Studio\VC98\Include" hello_world.cpp
all on one line, and get the following error message:

Code:
Microsoft (R) 32-bit C/C++ Standard Compiler Version 13.00.9466 for 80x86
Copyright (C) Microsoft Corporation 1984-2001. All rights reserved.

hello_world.cpp
Microsoft (R) Incremental Linker Version 7.00.9466
Copyright (C) Microsoft Corporation.  All rights reserved.

/out:hello_world.exe
hello_world.obj
LINK : fatal error LNK1104: cannot open file 'libcp.lib'

I *thought* I performed all necessary actions at install time to allow command-line compiles, but maybe I forgot something. I can't seem to work around this - any help *very* appreciated.

Thanks,
dora c
 
Of course make sure your program compiles not using the dos command - if it does then you are probably missing some environment variables...

Check in your Control Panel->System and the advanced tab I think should be something to show you the user environment variables and the system environment variables. Look to see if you have any variables listed that start with Vc these are the paths to the libs and header files and other common files.


Rocco is the BOY!!

SHUT YOUR LIPS...
ROCCOsm.gif
 
During VC++ installation a .bat-file is created : vcvars32.bat.
It is located in the VC98\bin directory.

Execute that when starting a new console, and all the required environment variables will be set to the correct values during the life of this console.

During installation you should have been asked if you wanted to register this file (Or someting similar). If you answered yes, you wouldn't have to execute the file manually when creating a new console.

/JOlesen

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top