Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

setting up laptop for c

  • 28-08-2007 09:34PM
    #1
    Registered Users, Registered Users 2 Posts: 952 ✭✭✭


    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, Registered Users 2 Posts: 26,449 ✭✭✭✭Creamy Goodness


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


  • Registered Users, Registered Users 2 Posts: 23,202 ✭✭✭✭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, Registered Users 2 Posts: 952 ✭✭✭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, Registered Users 2 Posts: 26,449 ✭✭✭✭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