Answers to: Where can I get a simple Linux IDE (Integrated Development Environment)?http://linuxexchange.org/questions/851/where-can-i-get-a-simple-linux-ide-integrated-development-environment<p>I have an answer for this one ... wanted to share.</p> <p>The question comes up with some regularity. For me it came up because I was teaching a beginner to code in C / C++ on his Ubuntu box, but they had already been spoiled by limited exposure to a Windows IDE.</p> <blockquote> <p>You mean you have type gcc at the command line ... and then you have to type the program name to execute it? Why can't I just hit a button?</p> </blockquote> <p>The answer is that IMHO, teaching a development environment to a beginner before you teach them C makes things harder, not easier. So what you want for a beginner is something as dirt simple as possible, that does not interpose itself between them and their code.</p> <p>I attach my answer ... and am eager for other contributions.</p>enMon, 14 Jun 2010 21:27:42 -0400Answer by donhttp://linuxexchange.org/questions/851/where-can-i-get-a-simple-linux-ide-integrated-development-environment/853<p>IMHO, the rookie must understand what a shell is, an ASCII file-C program and how to run gcc. This is before he attempts anything. This urge to "Why can't I just click?" irks me. Once he grasps a few basics, he will need a real IDE that can be used to throw up an X window or whatever. Skip the IDE it spoils noobs, I still don't use one........don</p>donMon, 14 Jun 2010 21:27:42 -0400http://linuxexchange.org/questions/851/where-can-i-get-a-simple-linux-ide-integrated-development-environment/853Answer by pcardouthttp://linuxexchange.org/questions/851/where-can-i-get-a-simple-linux-ide-integrated-development-environment/852<p>I was inspired by this thread:</p> <p><a href="http://ubuntuforums.org/showthread.php?t=330145" rel="nofollow">Compiling and running straight from gedit</a></p> <p>I like this solution because the beginner does not need to learn <strong>vim</strong> or <strong>emacs</strong> before starting to program. <strong>gedit</strong> <em>(gnome-edit)</em> is dead simple to use for most beginners who like pointing, clicking, cutting and pasting. Nonetheless, <strong>gedit</strong> does have <em>syntax highlighting</em> and <em>parenthesis-matching</em> (you need to turn bracket-matching on in your prefs.); certainly features that no programmer should do without. (Pity the poor Windows noobs who use <em>Notepad</em>). Further, <strong>gedit</strong> DOES have the ability for one click compiling and running -- it's just implemented in user scripts. So -- I explain the script system and provide some samples. After this you have a development environment that a beginner can use. I do assume that you are helping your beginner set this up.</p> <ol> <li>Click <em>Edit\Preferences</em>, go to <em>Plugins</em> tab, and enable <strong>External Tools</strong>. </li> <li>Go to <em>Tools\External Tools</em> and select <em>New</em>. A window will open with description <em>A Brand New Tool</em>. </li> <li>Go down to the command and type <strong>echo Hello!</strong>. </li> <li>Now when you execute <em>Tools\New Tool</em> you will see <em>Hello!</em> in your <em>Shell Output</em> window.</li> <li><strong>cd ~/.gnome2/gedit/tools; ls</strong></li> <li>You will see one or more scripts labeled <em>new-tool</em></li> <li>You can copy and edit these scripts to create new commands. Clearly you can do this through the interface mentioned in step 4, but you can't configure everything with that interface. In particular, you can't change the tool name, so that all your tools are called <em>new-tool</em> in the pull-down menu.</li> <li>To create your first script, which will execute a program in your root directory,<br> <strong>cp new-tool execute</strong> in the directory you changed to in step 5.</li> </ol> <p>Here is my <em>execute</em> script.</p> <pre><code># [Gedit Tool] # Comment=Execute from current directory # Input=nothing # Name=Execute # Shortcut= Control&gt;x # Applicability=all # Output=output-panel echo -e "\nExecuting..." ;./${GEDIT_CURRENT_DOCUMENT_NAME%.*} </code></pre> <p>Here is my script called *CCompile_and_Execute*.</p> <pre><code># [Gedit Tool] # Comment=C-Compile and Execute # Input=nothing # Name=C Compile and Execute # Shortcut= Control&gt;c # Applicability=all # Output=output-panel echo -e "Compiling... \n" echo "gcc $GEDIT_CURRENT_DOCUMENT_NAME -o${GEDIT_CURRENT_DOCUMENT_NAME%.*}" gcc $GEDIT_CURRENT_DOCUMENT_NAME -o${GEDIT_CURRENT_DOCUMENT_NAME%.*} echo -e "\nExecuting..." ./${GEDIT_CURRENT_DOCUMENT_NAME%.*} </code></pre> <p>A couple of notes:</p> <ol> <li>These are ordinary <em>bash</em> scripts, but they have access to special environment variables (like GEDIT_CURRENT_DOCUMENT_NAME) and there are other special variables. </li> <li>The comment lines in the scripts are actually recognized by <em>gedit</em>.</li> <li>Should you wish to use a different compiler, just change <em>gcc</em> to <em>g++</em>, or whatever.</li> <li>Now that you know how to directly edit these script files, you can add custom commands galore to <em>gedit</em>.</li> </ol>pcardoutMon, 14 Jun 2010 06:37:40 -0400http://linuxexchange.org/questions/851/where-can-i-get-a-simple-linux-ide-integrated-development-environment/852