Thread: vcvar32.bat problem

  1. #1
    Registered User
    Join Date
    Feb 2002
    Posts
    19

    vcvar32.bat problem

    I need to be able to use nmake through the command line to compile make files. All the documentation that I have consulted has suggested that I use vcvar32.bat in the Bin folder. However when I use it if gives me an "Out of environment space" error.

    What is the matter with. How else am I supposed to use nmake.

    Im using MSVC++ 6.0 and Windows 98.

    Any thanks would be appreciated.

  2. #2
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    very simple. type
    Code:
    C:\>command /e:4096
    before working with anything else. you have to do that for each type you enter a dos prompt.

    the /e:4096 makes your enviroment variables have more storage space. right now you have a whole lotta stuff in there (like i do).

  3. #3
    Registered User
    Join Date
    Feb 2002
    Posts
    19
    Hey thanks a lot.

    The batch file now works fine.

    Unfortunately I have to go to ...\VC98\Bin folder every time and run it if i want to make anything.

    There has got to be an easier way to use nmake.

  4. #4
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    good question. the command.exe program is the command shell, and it wipes out any previous enviroment variables, like the path (which tells where often used programs are). i'll reply if i find anything

  5. #5
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    try putting the line "shell=C:\windows\command.com /e:4096" into config.sys. if config.sys has a message telling you to not edit it, add the line to the file it tells you to edit instead.

  6. #6
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,490
    actually, that probably won't work. instead, create a shortcut of command.com in the windows directory. take that shortcut, right click, go to properties, then the memory tab, then change the initial enviroment size from auto to 4096. then double click that whenever you want the command prompt.

  7. #7
    I'm Back
    Join Date
    Dec 2001
    Posts
    556
    [off topic]

    >>Any thanks would be appreciated.

    LOL

    -

  8. #8
    Registered User
    Join Date
    Feb 2002
    Posts
    19
    LOL
    whoops, you probably figured out that I meant "help".

    Thanks alot ygfperson.

    Except that does not fix my problem with having to run vcvars32.bat from the prompt everytime I need to use nmake to compile a makefile.

    What I think I need is something that will automatically set the eviroment variables then goes to "C:\Program Files\Microsoft Visual Studio\VC98\Bin" and run the batch file. Then brings itself back to "C:\".

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM