Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

setting up laptop for c

Options
  • 28-08-2007 9:34pm
    #1
    Registered Users Posts: 945 ✭✭✭


    Hey guys,

    I having a bit of trouble getting dev-c++ to run programs on my laptop.
    The laptop is Windows XP Pro SP2, and what i would like to do really is to set it up so that i can execute c programs from the command prompt.

    I also have the MiniGW Complier installed from http://www.mingw.org/.

    Any help would be greatly appreciated.


Comments

  • Registered Users Posts: 26,579 ✭✭✭✭Creamy Goodness


    what and where are you running into problems with the installation of dev-c++?


  • Registered Users Posts: 23,212 ✭✭✭✭Tom Dunne


    greenfly wrote:
    The laptop is Windows XP Pro SP2, and what i would like to do really is to set it up so that i can execute c programs from the command prompt.

    To set up any program so you can run it from the command prompt, the path to the binary has to be in your PATH environment variable.

    So, if the binary program X is in c:\program file\myprog\X.exe, then your path environment varible would need to include it. To set the variable, right-click on My Computer, go to Advanced, then environment variables. Add in the directory to your binaries there.


  • Registered Users Posts: 945 ✭✭✭Lord Derpington


    Cremo wrote:
    what and where are you running into problems with the installation of dev-c++?

    Not so much withe the installation and the program they are both fine, and quite good actually.
    When i go to run the programs inside dev-c++, they close straight away before i can see the result.

    Thanks Tom ill give that a go.


  • Registered Users Posts: 26,579 ✭✭✭✭Creamy Goodness


    quick little hack you can do...

    declare a dummy variable eg. int dummy.

    then right before your main finishes executing stick in a scanf to read into that variable like so

    scanf("%d", dummy) ;


Advertisement