Thread: C/C++ in Net Beans 6

  1. #1
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278

    C/C++ in Net Beans 6

    I have downloaded the IDE for C/C++ from the following link and have also installed latest MingW in my system. Now when I try to build the project a window comes up and says the follwing(please see the screenshot)

    Code:
    http://img209.imageshack.us/img209/637/20293945cy0.png
    IDE Downloaded from here...

    Code:
    http://dlc.sun.com.edgesuite.net/netbeans/6.0/final/
    So what should I do now?

  2. #2
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    I suggest you follow the instructions given in the "Installing MinGW" section of this Introducing Netbeans C/C++ Pack article.

    Basically, you also need to install MSYS and use the make provided by MSYS instead of the make provided by the basic MinGW installation.

    By the way, if you are like me and hate the .cc default source file extension for C++, you can change it in Tools -> Options -> Advanced Options -> IDE Configuration -> System -> Object Types -> C++ Data Objects.
    Last edited by laserlight; 02-25-2008 at 11:39 PM.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  3. #3
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278
    So I need to install MSYS. Right? So from where can I get the installer?
    Actually I have installed the compiler through 'MinGW-5.1.3.exe' which downloaded the latest components and installed.

  4. #4
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    So I need to install MSYS. Right? So from where can I get the installer?
    From the MinGW download area on SourceForge, under "MSYS Base System". The current installer is MSYS-1.0.10.exe. After installation, remember to add the MSYS bin directory to the system path.

    Actually I have installed the compiler through 'MinGW-5.1.3.exe' which downloaded the latest components and installed.
    Yes, but MSYS is separate from MinGW, even though both are developed by the MinGW team.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  5. #5
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278
    SO much thanks...but again I am confused! Which package from the following to download! Please tell!!

    http://sourceforge.net/project/showf...lease_id=46827

  6. #6
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Download MSYS-1.0.10.exe from the msys-1.0.10 release.
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  7. #7
    Registered User
    Join Date
    Nov 2006
    Posts
    519
    you can install wascana, its a preconfigured distribution of mingw and msys sou you just have to run the installer and can compile immedately

    http://wascana.sourceforge.net/

  8. #8
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278
    WOW! So much thanks...It worked! Thank you LaserLight!
    But now it shows Windows cannot find 'sh'. Make sure you typed the name correctly, then try again. Any further changes please?

  9. #9
    Anirban Ghosh
    Join Date
    Jan 2006
    Posts
    278
    Now it worked! I have included the path of sh in PATH!...Thanks once again!

  10. #10
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    you can install wascana, its a preconfigured distribution of mingw and msys sou you just have to run the installer and can compile immedately
    Looks good, but the bad part about such all-in-one installers is that it is a 90+ MB download when anirban only needs about 20+ MB worth of packages.

    WOW! So much thanks...It worked! Thank you LaserLight!
    You're welcome
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  11. #11
    Registered User
    Join Date
    Nov 2008
    Posts
    1

    sh problem

    so i try to run my c++ program in netbeans. it builds and everything but then when i go to run it i also get the Windows cannot find 'sh'. Make sure you typed the name correctly, then try again. How do i include that.

  12. #12
    Registered User
    Join Date
    Dec 2007
    Posts
    2,675
    This should be a separate question, but thanks for using the search facility!

    sh is a shell (Bourne shell, to be exact) under Linux/UNIX that's not part of Windows, unless you've installed Cygwin. I assume you're trying to run an exec() function containing "sh some_command"?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. time measure (net and gross) with pthreads under linux
    By mynickmynick in forum Linux Programming
    Replies: 12
    Last Post: 12-01-2008, 07:39 AM
  2. Net cpu usage of pthreads?!
    By mynickmynick in forum C++ Programming
    Replies: 15
    Last Post: 09-26-2008, 07:59 AM
  3. Net Beans 5.5
    By anirban in forum Tech Board
    Replies: 0
    Last Post: 04-15-2007, 09:06 AM
  4. "surfing" the net
    By Aran in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 04-19-2002, 11:36 PM
  5. Net Framework Installation
    By Sorensen in forum C# Programming
    Replies: 2
    Last Post: 01-15-2002, 11:25 AM