use GCC compiler, if IDE exists? [closed] - gcc

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 9 years ago.
Improve this question
I wanted to know ,why still use GCC and editors (i.e.vim or Emacs ), if there are full ides?
Because I found so many people, and sites still explain programming using GCC
I don't want you to feel bored I just want simple answers

IDEs are just glorified editors (like emacs is). The compilation is still done by a command line compiler (very often GCC or perhaps CLANG). That compilation command is started by the IDE.
And FWIW, it is significant that most free software on Linux coded in C or C++ is using "command line" building utilities (make, gcc, autoconf....). Very few free software are developed using IDEs.
I strongly suggest looking inside existing free software source code. You'll learn a lot.
AFAIK, there is no IDE directly compiling C or C++ code. All IDEs are running some command-line oriented compiler, so it is useful to understand how the gcc compiler should be invoked (at least to configure your IDE to run gcc as needed).
My opinion is opposite to yours, I don't understand why people use IDE (with C or C++). I'm very happy with emacs (I build by pressing F8 there -bound to M-x recompile- and go to the next error site with F10 -bound to M-x next-error-. Got that with a couple of lines in my ~/.emacs file.). And emacs already has some auto-completion with ESC /. Occasionally I start the debugger under emacs with M-x gdb or a shell under emacs with M-x shell.
See also this answer with more detailed hints.

Related

How can I install pc, a pascal compiler? [closed]

Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 years ago.
Improve this question
I only found fpc but not pc in my system to compile pascal. The system is redhat. How should I install pc? The only one I found is http://www.freepascal.org/. But it doesn't seem have pc.
pc is a general name for the system Pascal compiler on old unices, just like cc was the equivalent for the system C compiler.
If the code is really old and from mainframe or unix descent (early eighties), it is probably Berkeley, Sun or some other OS/vendor specific Pascal. If not then sb just tried to mimic that for the buildsystem of a newer codebase by symlinking "pc" to some other compiler.
Anyway, "pc" is too generic, and more information is needed to know what compiler you are searching for. Free Pascal always referred to itself either as ppc or as fpc, never as "pc".
To my best knowledge Berkeley Pascal was removed from the distro going from BSD to *BSD in the early nineties, and never made it to Linux.
Your best bet is to port to an existing compiler, porting to Free Pascal (using mode ISO) or Gnu Pascal in the very unlikely case that it is an Extended Pascal dialect codebase. Gnu Pascal, despite being unmaintained, is still buildable with a considerable effort.
The convention to symlink pascal compilers to "pc" never really caught on, and neither is there an universal buildsystem that requires the shortcut.
Even for C buildsystems seems to favour the CC environment variable for the C compiler's name nowadays.

Any good IDE for Ruby on windows? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I began learning Ruby this morning, so please forgive me if my questions sound silly ;=)
I had experience programming C++ with visual studio before, so I want to ask if there are IDEs like VS for ruby. (I noticed that I can write python with VS, but not ruby...)
Also, my friend told me that Eclipse can be used for ruby, but debug is painful, because you can not watch the value of a variable in eclipse.
Since I have thousands of lines of ruby code to read and understand, it will really be helpful if someone recommend me a good IDE to debug with.
Thanks in advance.
Rubymine is the only real IDE I know of (trial for 30 days), but most of the people use a texteditor like Sublime Text, eventually expanded with addons for the language you program in.
I wouldn't advise Eclipse unless you are allready familiar with it, a lot to configure and slow.
You don't really need an IDE for debuging, take a look here.
IMHO, all IDEs that supports Ruby are
Netbeans
IntelliJ IDEA
Eclipse
RubyMine
RubyMine is the best IDE, it supports some great features like refactoring
But I use vim , which is you know beyond the best IDE :)
Netbeans actually support Ruby but i don't know if it brings more options than Eclipse. Check it out : http://www.netbeans.org/features/ruby/index.html
If you are already comfortable with Eclipse, you can use Aptana, it's web dev counterpart.
Many ruby developers use a full-featured text editor instead of an "IDE". I would guess using a text editor is more popular among ruby devs than using an IDE.
The difference between text editor and IDE can be somewhat blurry, but generally a text editor has fewer language integration features than an IDE. Although sometimes features approaching what one would expect from an IDE are available. As ruby is not compiled, compilation/packaging features are not generally required from a text editor/IDE.
SublimeText is a popular text editor among rubyists, that runs on Windows as well as OSX and Linux.
There is at least one ruby debugger plugin for SublimeText; I have not used it myself.

gcc assembly vs direct to machine code [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 8 years ago.
Improve this question
I recently started learning how to program, and I found this one thing curious:
Why does gcc go the extra mile of compiling the c-code to assembly and then to machine code?
Wouldn't it be just as reasonable to compile direct to machine code? I know that e.g. the MS c Compiler does this, so what's the reason for gcc for behaving like this?
Because for one thing, there's already the assembler who does a fairly good job at tranlating assembly to machine code -- there would be no point in gcc re-implementing that functionality. (also keep in mind that assembly still is /somewhat/ symbolic) On a second point, one probably doesn't /always/ want to compile straight down to machine code -- on embedded systems, there's a good chance the generated assembly undergoes a final by-hand optimization.Last but not least, it's very helpful in debugging the compiler itself in case it misbehaves. Nobody likes to read raw machine code.
GCC is very much unix and this is the unix way to make separate tools that build on each other rather than integrating. You need to have an assembler and linker, the job of the assembler is to generate machine code for a target, makes no sense to repeat that. the job of the compiler is to boil down a higher level language to a lower one. Generating assembly language allows for much easier debugging of the compilers output, and it lets the assembler do its job rather than repeating the task in two places.
Of course it is not only unix compilers that do this, it makes a lot of sense to do this on all platforms and has been done this way forever. Straight to machine code is the exception rather than the rule, usually when there is a specific reason to do so.
I dont understand the fascination with this question and why it keeps getting asked over and over again. Please search for previous answers before asking...

What's the best way to program F# on OSX 10.8? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I'm studying in university F#, and looked a bit on the internet but couldn't find a nice program to code in F#. Any suggestions?
F# Software Foundation is a great resource to start with.
Here is an excerpt from Using F# on Mac OSX:
What should I use to edit my code?
Some editors have specific support for F#, either builtin or through
addons provided by the F# community:
We recommend Xamarin Studio or MonoDevelop with the F# AddIn for
MonoDevelop.
Emacs. There is an F# mode for Emacs that extends Emacs
with syntax highlighting for F#, support for working with F#
Interactive and also automatic indentation.
VIM
SublimeText
While the first two options have the most up-to-date support, you can also use F# Interactive via command line and use the editor you feel the most comfortable with.

GNU Tool to find memory leak on windows [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 1 year ago.
Improve this question
I am trying to use the tools in the mingw toolkit, g++, gdb, gprof etc... but is there any way to detect memory leaks in gprof (the profiler) or gdb. I have heard that detecting leaks in gdb is possible in hp-unix, but for it isn't for windows. the reason I am trying to stick to gnu is because my computer has a 40GB hard that is already gunked programs pictures and videos. I have tried moving them to a seperate drive. and now that is running out of space... now both my hard disc and external drive are full. also the computer has an intel pentium 4 processer. so getting, for instance visual studio. is out of the question...
also it's sort of a moral thing... I hate when you search how to compile a library or something. and they just say: "compile it with visual c++", I hate that. so when I find all the tools I need in the gnu-toolkit. I feel like I can spit on visual c++ and go 'HAH'
I have heard of valgrind, but it's only for linux and mac. so in conclusion
ARE THERE ANY GNU TOOLS THAT CAN DETECT MEMORY LEAKS ON WINDOWS
You can use deleaker - is a powerful tool to control leaks of resources.
Goodluck!
Have a look at this http://wyw.dcweb.cn/leakage.htm

Resources