Ask a Question related to Ubuntu, Design and Development.

  1. #1

    Default Compiler Startup

    I haven't done any programming for a considerable time and would like to
    pick it up again. I've loaded what I think are the GCC and GPC compilers
    with no apparent problems. However, I can't find the darned things!!

    Can someone give me a clue as to how they can be initiated - I would have
    anticipated their appearance in a "Path" file at least. Also appreciated
    would be the location of the documentation files which I also think were
    installed.

    TIA
    Tom
    Tom Clydesdale Guest

  2. Similar Questions and Discussions

    1. CHM Compiler
      Has anyone come across a DW extension that'll compile to CHM files? - Maybe using H tags for topics or ...? Thanks, Corona
    2. Re[4]: [PHP-DEV] PHP compiler
      Hello Antony, Wednesday, August 6, 2003, 8:43:13 PM, you wrote: AD> If archive is all what you want to get, then what prevents you to write...
    3. Re[6]: [PHP-DEV] PHP compiler
      Hello Wez, Wednesday, August 6, 2003, 9:30:17 PM, you wrote: WF> This isn't really an internals matter, and isn't going to happen in the core...
    4. Re[2]: [PHP-DEV] PHP compiler
      The only problem with that approach is that you have to distribute the php executable and your program is loaded using a command line similar to: ...
    5. Compiler Error Message: The compiler failed with error code 128.
      Hi. I am having trouble running my aspx code. I created two simple webforms, which i try to run from two different directories one is giving me...
  3. #2

    Default Re: Compiler Startup

    Hello Tom,

    usually the GCC and GPC executable files will be installed under /usr/bin

    This directory is in the PATH so you can just execute these files from
    the command line by typing "gcc" or "gpc". If this doesn't work, have a
    look at you path variable with the command

    echo $PATH

    or look in the /usr/bin directory with

    ls /usr/bin/g?c

    UNIX Documentation files comes in the form of man(nual) and/or info pages.

    The command

    man gcc

    respectively

    info gcc

    should do the trick. Or where you talking about system documentation for
    programming?

    I hope that helps.

    Alex

    Tom Clydesdale schrieb:
    > I haven't done any programming for a considerable time and would like to
    > pick it up again. I've loaded what I think are the GCC and GPC compilers
    > with no apparent problems. However, I can't find the darned things!!
    >
    > Can someone give me a clue as to how they can be initiated - I would have
    > anticipated their appearance in a "Path" file at least. Also appreciated
    > would be the location of the documentation files which I also think were
    > installed.
    >
    > TIA
    > Tom
    Alexander Koch Guest

  4. #3

    Default Re: Compiler Startup

    -----BEGIN PGP SIGNED MESSAGE-----
    Hash: SHA1

    On 2006-04-07, Tom Clydesdale <t.clydes@comcast.net> wrote:
    > I haven't done any programming for a considerable time and would like to
    > pick it up again. I've loaded what I think are the GCC and GPC compilers
    > with no apparent problems. However, I can't find the darned things!!
    >
    > Can someone give me a clue as to how they can be initiated - I would have
    > anticipated their appearance in a "Path" file at least. Also appreciated
    > would be the location of the documentation files which I also think were
    > installed.
    >
    > TIA
    > Tom
    Use which, as in ...

    which gcc

    or even better
    slocate gcc

    Eric

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG v1.4.1 (GNU/Linux)

    iD8DBQFENxc6cLztWWU+V+oRAuWHAKCjCrjXhqmaZkr2Nw1RnH uTUEWyzgCcDRJL
    EJLDsjqKtt2Cynd9/MkXm9o=
    =kjvZ
    -----END PGP SIGNATURE-----
    Eric Meyers Guest

  5. #4

    Default Re: Compiler Startup

    On Fri, 07 Apr 2006 20:51:53 -0500, Eric Meyers wrote:
    > -----BEGIN PGP SIGNED MESSAGE-----
    > Hash: SHA1
    >
    > On 2006-04-07, Tom Clydesdale <t.clydes@comcast.net> wrote:
    >> I haven't done any programming for a considerable time and would like to
    >> pick it up again. I've loaded what I think are the GCC and GPC compilers
    >> with no apparent problems. However, I can't find the darned things!!
    >>
    >> Can someone give me a clue as to how they can be initiated - I would have
    >> anticipated their appearance in a "Path" file at least. Also appreciated
    >> would be the location of the documentation files which I also think were
    >> installed.
    >>
    >> TIA
    >> Tom
    >
    > Use which, as in ...
    >
    > which gcc
    >
    > or even better
    > slocate gcc
    >
    > Eric
    >
    > -----BEGIN PGP SIGNATURE-----
    > Version: GnuPG v1.4.1 (GNU/Linux)
    >
    > iD8DBQFENxc6cLztWWU+V+oRAuWHAKCjCrjXhqmaZkr2Nw1RnH uTUEWyzgCcDRJL
    > EJLDsjqKtt2Cynd9/MkXm9o=
    > =kjvZ
    > -----END PGP SIGNATURE-----
    Thank you gentlemen you gave me the mental clue for proceeding - my
    problem turned out to be semantics (?) in that both programs require the
    version number as part of the program name (ie. gcc-4.0). Without version
    number they remain unknown.

    With all my attempts to install gcc I wound up with 3 versions loaded
    (272, 3.4 & 4.0) and I wonder which might be most desirable since ubuntu
    seems to consider all as "current".

    Again many thanks,
    Tom

    Tom Clydesdale Guest

  6. #5

    Default Re: Compiler Startup

    Tom Clydesdale wrote:
    > On Fri, 07 Apr 2006 20:51:53 -0500, Eric Meyers wrote:
    >
    >> -----BEGIN PGP SIGNED MESSAGE-----
    >> Hash: SHA1
    >>
    >> On 2006-04-07, Tom Clydesdale <t.clydes@comcast.net> wrote:
    >>> I haven't done any programming for a considerable time and would like to
    >>> pick it up again. I've loaded what I think are the GCC and GPC compilers
    >>> with no apparent problems. However, I can't find the darned things!!
    >>>
    >>> Can someone give me a clue as to how they can be initiated - I would have
    >>> anticipated their appearance in a "Path" file at least. Also appreciated
    >>> would be the location of the documentation files which I also think were
    >>> installed.
    >>>
    >>> TIA
    >>> Tom
    >> Use which, as in ...
    >>
    >> which gcc
    >>
    >> or even better
    >> slocate gcc
    >>
    >> Eric
    >>
    >> -----BEGIN PGP SIGNATURE-----
    >> Version: GnuPG v1.4.1 (GNU/Linux)
    >>
    >> iD8DBQFENxc6cLztWWU+V+oRAuWHAKCjCrjXhqmaZkr2Nw1RnH uTUEWyzgCcDRJL
    >> EJLDsjqKtt2Cynd9/MkXm9o=
    >> =kjvZ
    >> -----END PGP SIGNATURE-----
    >
    > Thank you gentlemen you gave me the mental clue for proceeding - my
    > problem turned out to be semantics (?) in that both programs require the
    > version number as part of the program name (ie. gcc-4.0). Without version
    > number they remain unknown.
    >
    > With all my attempts to install gcc I wound up with 3 versions loaded
    > (272, 3.4 & 4.0) and I wonder which might be most desirable since ubuntu
    > seems to consider all as "current".
    >
    > Again many thanks,
    > Tom
    >
    IMHO, unless you have a reason not to, use 4.0, or whatever the latest
    is. Using a makefile or IDE which handles the makefile for you will
    save you the grunt work of manually calling g++ mycodefile.cpp for all
    your files.

    ~S
    Shea Martin Guest

  7. #6

    Default Re: Compiler Startup

    >>> On 2006-04-07, Tom Clydesdale <t.clydes@comcast.net> wrote:
    >>>> I haven't done any programming for a considerable time and would like to
    >>>> pick it up again. I've loaded what I think are the GCC and GPC compilers
    >>>> with no apparent problems. However, I can't find the darned things!!
    >>>>
    >>>> Can someone give me a clue as to how they can be initiated - I would have
    >>>> anticipated their appearance in a "Path" file at least. Also appreciated
    >>>> would be the location of the documentation files which I also think were
    >>>> installed.
    >>>>
    >>>> TIA
    >>>> Tom
    >
    Well, I got it loaded, installed a link to the program and tried to run a
    very small test - the file <stdio> appears to be missing! I've checked
    all the specified files seem to be loaded - can someone point me in the
    correct direction?

    TIA Tom

    Tom Clydesdale Guest

  8. #7

    Default Re: Compiler Startup

    "Tom"posted the following on 2006-04-08:
    > On Fri, 07 Apr 2006 20:51:53 -0500, Eric Meyers wrote:
    >
    >> -----BEGIN PGP SIGNED MESSAGE-----
    >> Hash: SHA1
    >>
    >> On 2006-04-07, Tom Clydesdale <t.clydes@comcast.net> wrote:
    >>> I haven't done any programming for a considerable time and would like to
    >>> pick it up again. I've loaded what I think are the GCC and GPC compilers
    >>> with no apparent problems. However, I can't find the darned things!!
    >>>
    >>> Can someone give me a clue as to how they can be initiated - I would have
    >>> anticipated their appearance in a "Path" file at least. Also appreciated
    >>> would be the location of the documentation files which I also think were
    >>> installed.
    >>>
    >>> TIA
    >>> Tom
    >>
    >> Use which, as in ...
    >>
    >> which gcc
    >>
    >> or even better
    >> slocate gcc
    >>
    >> Eric
    >>
    >> -----BEGIN PGP SIGNATURE-----
    >> Version: GnuPG v1.4.1 (GNU/Linux)
    >>
    >> iD8DBQFENxc6cLztWWU+V+oRAuWHAKCjCrjXhqmaZkr2Nw1RnH uTUEWyzgCcDRJL
    >> EJLDsjqKtt2Cynd9/MkXm9o=
    >> =kjvZ
    >> -----END PGP SIGNATURE-----
    >
    > Thank you gentlemen you gave me the mental clue for proceeding - my
    > problem turned out to be semantics (?) in that both programs require the
    > version number as part of the program name (ie. gcc-4.0). Without version
    > number they remain unknown.
    >
    No they dont : go to the synaptic package manager and install
    "gcc" and just type "gcc" at the command line.
    Richard Guest

  9. #8

    Default Re: Compiler Startup


    sudo apt-get install build-essentia
    R Guest

  10. #9

    Default Re: Compiler Startup

    R schrieb:
    > sudo apt-get install build-essentia
    there is an "l" missing

    sudo apt-get install build-essential
    Alexander Koch Guest

  11. #10

    Default Re: Compiler Startup

    Tom Clydesdale wrote:
    >
    >>>> On 2006-04-07, Tom Clydesdale <t.clydes@comcast.net> wrote:
    >>>>> I haven't done any programming for a considerable time and would like
    >>>>> to
    >>>>> pick it up again. I've loaded what I think are the GCC and GPC
    >>>>> compilers
    >>>>> with no apparent problems. However, I can't find the darned things!!
    >>>>>
    >>>>> Can someone give me a clue as to how they can be initiated - I would
    >>>>> have
    >>>>> anticipated their appearance in a "Path" file at least. Also
    >>>>> appreciated would be the location of the documentation files which I
    >>>>> also think were installed.
    >>>>>
    >>>>> TIA
    >>>>> Tom
    >
    >
    >>
    > Well, I got it loaded, installed a link to the program and tried to run a
    > very small test - the file <stdio> appears to be missing! I've checked
    > all the specified files seem to be loaded - can someone point me in the
    > correct direction?
    >
    > TIA Tom
    FWIW, there is no such thing as <stdio>. There's these options:
    #include <stdio.h> // for C programs
    #include <cstdio> // for C++ programs

    In short, C includes are the same as they always were. C++ including C
    libraries drop the ".h" suffix and add a "c" to the front. So <stdio.h>
    becomes <cstdio>, <math.h> becomes <cmath>, etc. This naming convention
    DOESN'T apply to system-specific headers though, like <sys/socket.h> remain
    the same for both C and C++. Confused? ;)

    Another gotcha with C++ is that if you've been out of the saddle a while,
    you'll find the compiler doesn't assume you're using the standard namespace
    so a lot of "old code" simply wont compile on newer compilers (or wont
    compile without complaining bitterly). So to get around it you need to
    add:

    using namespace std; // after the includes and before main()

    So the obligatory "Hello World!" app written in C++ these days looks like
    this:

    #include <iostream>
    using namespace std;

    int main(void){
    cout << "Hello World!" << endl;
    return 0;
    }

    The same thing without the namespace declaration looks like this:
    ....
    std::cout << "Hello World!" << std::endl;
    ....

    See the difference?

    HTH,

    James
    --
    America's best buy for a quarter is a telephone call to the right person.

    Centurion Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139