Thread: Compiling C++ with Netbeans for Windows

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

    Compiling C++ with Netbeans for Windows

    I'm not sure which section this best belongs in, and I don't want to make a new account on the Netbeans forum since this is my favorite forum and I lurk here a lot. Please move it to where appropriate if this is the wrong section.

    I am making a game using C++ and OpenGL and I want it to run in Windows at the minimum. Previously I had been using DevC++ but it was buggy and didn't have some of the cool features that Netbeans had so I switched over for this project.
    Netbeans needed Cygwin for it's compiler and other tools. But apparently, it compiles the program so it can only be run by Cygwin.

    Attempting to run it in Windows gets "Failed to open display '' ". Some searching revealed the solution is starting it in a Cygwin XServer.

    My question is, how do I set up Netbeans so that it can compile for Windows, or is it not possible at all and I need a different IDE?

  2. #2
    and the Hat of Guessing tabstop's Avatar
    Join Date
    Nov 2007
    Posts
    14,336
    NetBeans will work with MinGW (the gnu tools for windows), or at least so says the web page; I've never used NetBeans, so I don't know for sure how to make that happen -- presumably there's a setting, somewhere.

    Anyway, you can get MinGW from MinGW | Minimalist GNU for Windows.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Quote Originally Posted by Noise
    Netbeans needed Cygwin for it's compiler and other tools. But apparently, it compiles the program so it can only be run by Cygwin.
    Read Introducing Netbeans C/C++ Pack. In particular, it recommends the use of MinGW over Cygwin. That said, I only tried this out successfully in Netbeans 6.0, so I cannot say if it still works perfectly with the latest version of Netbeans.
    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

  4. #4
    Registered User
    Join Date
    Nov 2008
    Posts
    41
    Thanks heaps guys, yes MinGW seems to be what I need

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need Help Compiling A VC++ 6 Project In Dev C++ 4.9.9.2
    By shen747 in forum C++ Programming
    Replies: 10
    Last Post: 09-17-2009, 09:52 PM
  2. from dev-c++ mingw to netbeans cygwin
    By yahn in forum C++ Programming
    Replies: 10
    Last Post: 01-14-2009, 08:18 AM
  3. NetBeans + Cygwin driving me insane
    By Del75 in forum C++ Programming
    Replies: 4
    Last Post: 08-17-2008, 05:03 AM
  4. Screwy Linker Error - VC2005
    By Tonto in forum C++ Programming
    Replies: 5
    Last Post: 06-19-2007, 02:39 PM
  5. Compiling syntax
    By Jez_Master in forum C++ Programming
    Replies: 3
    Last Post: 04-01-2002, 09:46 PM