1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Directories in TurboC++

Discussion in 'Software Development' started by motocross95, Dec 11, 2001.

Thread Status:
Not open for further replies.
Advertisement
  1. motocross95

    motocross95 Thread Starter

    Joined:
    Oct 30, 2001
    Messages:
    110
    I am using Borland Turbo C++ version 3. Can someone help me please. Whenever I load up the program I have to reset the include and BGI directories. It's not just those two though all the ones on that menu. Anyone have a way to set those directories automatically when I run the application? Any help would be GREATLY appreciated thank you.
     
  2. MacFromOK

    MacFromOK

    Joined:
    Mar 18, 2001
    Messages:
    1,741
    If your PATH is set to include the directories, it
    should work OK.

    You can modify the PATH line in your autoexec.bat
    file to include your compiler (or other) directories,
    just place a semi-colon between each added path.

    Example original line (yours may vary):
    SET PATH=c:\dos;c:\windows;c:

    Example new line (yours may vary):
    SET PATH=c:\dos;c:\windows;c:;c:\tc\bin;c:\tc\bgi

    OR you can make a batch file to do the same
    thing and run it before loading your compiler.
    Just use the %path% var as shown to avoid
    losing your original path setting. NOTE: only
    run this once between reboots because the
    %path% variable will keep adding to itself
    each time it's run (you could just copy the
    current path itself instead of using %path%).

    (Again, yours may vary)
    SET PATH=%path%;c:\tc\bin;c:\tc\bgi

    Cheers, Mac :)
     
  3. motocross95

    motocross95 Thread Starter

    Joined:
    Oct 30, 2001
    Messages:
    110
    I don't really understand the deal about the autoexec.bat thing. When I load up Turbo C++ and go to options, then directories and it tells the directories for specified files when compiling. Well I set them so the programs will work and everything but when I exit the program and start it back up I have to change the directories again. They never are saved. Thanks
     
  4. MacFromOK

    MacFromOK

    Joined:
    Mar 18, 2001
    Messages:
    1,741
    OK, what is the drive\directory of your Turbo C++?

    Also, goto a DOS prompt and type:

    path

    then press ENTER. Post the results here.
     
  5. motocross95

    motocross95 Thread Starter

    Joined:
    Oct 30, 2001
    Messages:
    110
    I'm running XP, and it can't find "path". My turbo C++ is located at "C:\TC\TC\", I know I know, why not just have it at "C:\TC\" well I'm just too lazy to do that hehe. I will eventually, now back to the problem at hand.
     
  6. MacFromOK

    MacFromOK

    Joined:
    Mar 18, 2001
    Messages:
    1,741
    Ouch... I don't think XP runs DOS as we know it,
    so I don't have a clue on this one. Sorry.

    Cheers, Mac :)
     
  7. motocross95

    motocross95 Thread Starter

    Joined:
    Oct 30, 2001
    Messages:
    110
    XP has a command prompt
     
  8. MacFromOK

    MacFromOK

    Joined:
    Mar 18, 2001
    Messages:
    1,741
    I'm sure it does, but the absence of a PATH
    command pretty much kills my suggestions.

    You might try typing:

    set

    and then press ENTER. If it has a list of vars
    and one is PATH=(whatever), we might still
    come up with something. Otherwise you'll
    need some input from an XP user.

    I'm still running Windows 95...

    Cheers, Mac :)
     
  9. motocross95

    motocross95 Thread Starter

    Joined:
    Oct 30, 2001
    Messages:
    110
    Nope "set" does not do anything, it can't find it. Anyone else have any input? Remember directories in Turbo C++ won't stay and I must change them everytime I start Turbo C++.
     
  10. motocross95

    motocross95 Thread Starter

    Joined:
    Oct 30, 2001
    Messages:
    110
    Does no one else have any idea? Surely someone must have had this problem before.
     
  11. motocross95

    motocross95 Thread Starter

    Joined:
    Oct 30, 2001
    Messages:
    110
    ANYONE OUT THERE!?
     
  12. MacFromOK

    MacFromOK

    Joined:
    Mar 18, 2001
    Messages:
    1,741
    Since it seems this is going to require an
    XP specific solution, you might try posting
    in the Windows NT/2000/XP forum. :)
     
  13. motocross95

    motocross95 Thread Starter

    Joined:
    Oct 30, 2001
    Messages:
    110
    How about if I right click on the icon, click properties, then add the directories somehow onto the command line so they load up every time the program starts? Think that would work? if you think it would could you tell me the syntax of doing that. thanks.
     
  14. motocross95

    motocross95 Thread Starter

    Joined:
    Oct 30, 2001
    Messages:
    110
    Problem fixed. I asked a very knowledgable fellow up here and he told me to unclick read-only on the files, so I did it and it worked. In case anyone had that problem before.
     
  15. MacFromOK

    MacFromOK

    Joined:
    Mar 18, 2001
    Messages:
    1,741
    Great, glad you found the problem. :)

    You mentioned:
    This wouldn't have worked anyway. You
    can specify a start directory in the properties
    window, but not a whole list (unless XP is
    different...). And you can't add multiple paths
    to the command line.

    Cheers, Mac :)
     
  16. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/61494

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice