How to hook a compiler onto a IDE

Hello i got a important question

I normally use codeblocks which comes with minGW so i dont have to go through the process to hook a compiler up.

I wanted to try netebeans with the C++ extension... it was a headache I was struggling so much to get a compiler hooked on Cygwin made things confused and got me more confused.

A little help please thanks for any replies
Bonus question
Once you have done your first C++ book or tutorial how do you become better ?
Like getting rid of bad habits writing neater better looking code ??
https://netbeans.org/community/releases/60/cpp-setup-instructions.html


The best way to get rid of bad habits is not to pick them up. Make sure that your learning material is very good, and remember what knowledgeable people say about things.

Other than that, just program. You learn better and better as you go.
I tried that link that's where I got so annoyed I deleted net beans :(
You want to learn how to set of a bare compiler? First you must learn the command line better. TRUST ME. I was where you were: teaching myself from knowing squat to knowing a lot.

How you set it up is:

1. install the compiler (obviously):
SPECS:
- Make sure the compiler is installed in (I assume you use windows?) a top-level directory
(folder...) with NO SPACES. Somthing like "C:\MinGW" should be fine.
- Look inside the folder your compiler was installed into, and you should see a folder
called "bin". Remember where that folder is.

2. Add the compiler's binaries to the PATH environment variable. Look up what environment variables are.
- DO NOT remove anything from the variable, just append the path to the "bin" folder I
told you to remember.

3. Now if you want to restart your computer, now's a good time.
4. Open up command prompt and type: "g++ --version" (note, "g++" may not work; go into your
bin folder and find the g++ binary, it may be named somthing like "mingw32g++" or somthing
goofy like that). If you get somthing like "command not found!", you did somthing wrong.
Otherwise, congrats!


Once you've successfully set that up, you can call the compiler from any "command line". This doesn't help you much if you don't know how to use it, though. You can go online and look up how to compile a program with g++, OR you can use a build system like CMake.
So instead of using a IDE I should use a terminal I can cope with either way would it be better if I used a terminal which would be cmd
Use an IDE. You don't have to use an IDE to compile your code, but until you know enough to use and maintain a build system you should keep using your IDE.
I don't think adding stuff about the command line is going to help him set up his IDE.

Most (good) IDEs have options to control how to set up the compiler.
Rest assured, it is a lot of information you have to wade through, but it is all fairly easy to find by exploring the menu options.

To install any compiler, make sure you have:

the path to any LIBRARIES (.a and .lib files, usually found in a subdirectory of the compiler's install, and usually named something like "lib").

the path to any INCLUDES (.h and .hpp files, usually found in a subdirectory of the compiler's install, and usually named something like "include").

the path to the compiler's binary (.exe files, usually found in a subdirectory named something like "bin").

the command to activate the compiler.

Beyond that, the IDE should be able to handle things pretty well.


One final option is to find a NetBeans forum and ask there.

Good luck!
Topic archived. No new replies allowed.