Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8095927
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:18:03+00:00 2026-06-05T21:18:03+00:00

Using VC++ Command Line for the first time. Facing problem in setting proper paths

  • 0

Using VC++ Command Line for the first time. Facing problem in setting proper paths for cl.exe and other header files:

///simple.cpp, saved at **D:\Program Files\VC** 

#include <iostream>

int main()
{
    std::cout << "This is a native C++ program." << std::endl;
    return 0;
}

When typing on command:

cl /EHsc simple.cpp

returning error

D:\Program Files\VC> cl /EHsc simple.cpp
'cl' is not recognized as an internal or external command,
operable program or batch file.

Kindly note my Visual Studio is installed in D-drive.

As a work around I moved to bin folder where cl.exe is present:

 D:\Program Files\VC\bin>cl /EHsc simple.cpp
 Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.30319.01 for 80x86
 Copyright (C) Microsoft Corporation.  All rights reserved.

 simple.cpp
 simple.cpp(1) : fatal error C1083: Cannot open include file: 'iostream': No such
 file or directory

As you can see now it is unable to include “iostream”, which is present in include folder under D:\Program Files\VC\include

Please help me in setting the default paths properly.

Update:

Here are the content of the directory:

 Directory of D:\Program Files\VC

 06/15/2012  02:23 PM    <DIR>          .
 06/15/2012  02:23 PM    <DIR>          ..
 04/20/2012  12:24 PM    <DIR>          atlmfc
 06/15/2012  02:35 PM    <DIR>          bin
 04/20/2012  12:22 PM    <DIR>          crt
 04/20/2012  12:24 PM    <DIR>          include
 04/20/2012  12:24 PM    <DIR>          lib
 02/23/2012  05:16 PM             1,525 Notepad.lnk
 04/20/2012  12:23 PM    <DIR>          redist
 06/15/2012  02:31 PM               146 simple.cpp
 04/20/2012  12:22 PM    <DIR>          VCAddClass
 04/20/2012  12:21 PM    <DIR>          VCContextItems
 08/31/2009  02:46 AM               160 vcEmptyTestProject.vsz
 04/20/2012  12:21 PM    <DIR>          VCNewItems
 04/20/2012  12:22 PM    <DIR>          vcpackages
 04/20/2012  12:21 PM    <DIR>          VCProjectDefaults
 04/20/2012  12:25 PM    <DIR>          vcprojectitems
 04/20/2012  12:25 PM    <DIR>          vcprojects
 04/20/2012  12:22 PM    <DIR>          VCResourceTemplates
 09/30/2009  08:23 PM             1,237 vcvarsall.bat
 04/20/2012  12:25 PM    <DIR>          VCWizards
           4 File(s)          3,068 bytes
          17 Dir(s)   8,465,346,560 bytes free  
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:18:06+00:00Added an answer on June 5, 2026 at 9:18 pm

    For visual studio 2008 there is an environment variable: VS90COMNTOOLS that you can use. Probably something similar for VS2010.

    so:
    from the command line directly, or from a batch file:
    “%VS90COMNTOOLS%vsvars32.bat”

    (include the quotes!)

    This should set up stuff appropriately.

    You’ll need to replace %VS90COMNTOOLS% with the appropriate environment variable for 2010.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using command line (ant) to create and build android projects . I
I tried to create jar file using command line that I inserted into java
I'm trying to call a java program from python using command line. The code
I would like to crash my Android app by using command-line ADB tool during
i'm trying to move folders to another folders using command line , with overwrite
How do I put a file onto an sdcard using command line? I tried
In Delphi 2009, how can I build a project using command line. I tried
When I execute delphi 2009 project using MSBuild command line, output always goes to
I've put together a batch script to generate panoramas using the command line tools
I'm using log4j for the first time in a project. A fellow programmer told

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.