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.
Related
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...
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I'm working on a paper for school and I was wondering which compilers are supported by which operating systems.
I know Mac supports C and C++ (I know they're not that different but to me they are 2 different languages)
I was wondering which compilers/languages are supported by windows, which by Ubuntu and which by Mac.
Sorry for asking a straight question but i think there's people who know this straight away.
thanks
"Support" is a relative term here. At one extreme, I think if you have a computer with just about any version of Linux installed (Ubuntu is just one variety), if that version of the O/S isn't too stripped-down you will already have a compiler for C and C++ . If you just installed Windows, however (or got a new Windows computer from the factory), you almost certainly have no C or C++ compiler there and must obtain and install one. (There are various choices.) So Windows does not "support" C and C++ as well as Linux does, in that sense.
At the other extreme, just about any compilable language can be compiled on any of those three platforms ... if you are willing and able to write your own compiler.
In between those two extremes, you would have to ask whether someone anywhere has already written a compiler for that language on that platform, and whether you can obtain a copy of that compiler. Most of these are "third-party" software packages, so knowing which ones exist is partly a function of how well the compilers have been advertised. Even the Wikipedia page on this topic says its list may be incomplete. On the other hand, it's likely you have never heard of most of the languages that are listed there.
Wikipedia has a list of compilers and OS support here: https://en.wikipedia.org/wiki/List_of_compilers
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.
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
May be I'm missing something (Surely I do) but I don't understand a thing :
Each brand new version of Visual Studio is shipped with a particular msvcrtxx (msvcr100.dll, msvrct.dll, ...)
Right.
Except the fact it leads, often, to the famous "dll hell", I still don't understand why the "Windows Driver Kit" continues to produce binaries linked against the old MSVCRT.DLL !?
Windows always ships with an old, barebones version of MSVCRT, specifically so that drivers can have some basic runtime support without having to ship their own copies of the library. It's appropriate for drivers but no for higher level user-mode applications.
Each version of VS C++ ships with newer versions of the runtime libraries because the library standards (and support for the standards) is evolving. Sometimes these evolve in a way that's not backward compatible, so you can't guarantee that an older program, compiled against an older version of the DLL will work with a newer version of the DLL. By making the files explicitly versioned, much of the so-called DLL Hell problem is avoided. (DLL Hell is really only a problem if you make bad assumptions and design bad installers, especially nowadays with side-by-side versioning, merge modules, etc.)
Apps have to redistribute copies of whichever version they require, as there is no guarantee that the libraries they depend upon will exist on the computer.
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 am looking for a free, and possibly open source C compiler for PIC. I might go without C, but I would like to get both options.
There are various compilers out there, but since I have never done PIC development before, I am looking for user experience and advice. I am targetting the PIC16F88x family
Try SDCC - an open source Small Device C Compiler
I used it for small project during school and it worked great.
http://sdcc.sourceforge.net/
I am mentioning the PIC C compilers here, which are best when it comes to PIC Microcontroller Programming.
MPLAB C18 Compiler
MikroC Pro for PIC
CCS Compiler for PIC
You can read more about them on this post Top 3 PIC C Compiler, they have given a comparison between these 3 PIC Compilers i.e. there advantages and disadvantages.
Mikroelektronika has a series of compilers, including Pascal and C with very good libraries for most of the stuff you'll need, such as CompactFlash, USB, LCD and etc.
It's not free, but the free version has enough juice to allow you do to most of the basic stuff.
I recently got started with PIC c programming, and had some success with the lite version (free, but not open-source) of the Hi-Tech C compiler. I was using the PIC16F690 so it should work well for you too.
You can download the compiler here:
http://www.microchip.com/stellent/idcplg?IdcService=SS_GET_PAGE&nodeId=1406&dDocName=en542849
Have you seen the sourceboost c compiler?
This isn't open source but there is a free cost version details here. It seems to work very well.
You can try the CC5X C Compiler from http://www.bknd.com/cc5x/ it has an free edition too.
There is the hi-tech c compiler lite from microchip available here