emacs

This is a discussion on emacs within the C Programming forums, part of the General Programming Boards category; So in Linux or Unix I can write my code in emacs, than save it with a .cpp extention. Than ...

  1. #1
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784

    emacs

    So in Linux or Unix I can write my code in emacs, than save it with a .cpp extention. Than how do I compile it from there? What is the line of code?

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,796
    My best code is written with the delete key.

  3. #3
    Unregistered
    Guest
    You compile c++ source files with the command cpp, example:
    cpp source.cpp -o proggy
    Now that would name the output 'proggy'.

    For c source files its:
    gcc source.c -o proggy

  4. #4
    TrollKing
    Guest
    Thanks.

  5. #5
    Unregistered
    Guest
    or wait. What about make files. How are those constructed in Linux?

  6. #6
    Registered User
    Join Date
    Aug 2001
    Posts
    202
    You write them by hand. A google search should turn up a tut or two.

    starX
    www.axisoftime.com

  7. #7
    Banned Troll_King's Avatar
    Join Date
    Oct 2001
    Posts
    1,784
    Are you trying to tell me that handi capped people can't write them? You prejudiced bastard.

  8. #8
    Unregistered
    Guest
    You can't be Troll_King. Quzah says that I'm Troll_King.

  9. #9
    TK
    Guest
    Quzah is blind.

  10. #10
    Just because ygfperson's Avatar
    Join Date
    Jan 2002
    Posts
    2,493
    ugh... stop it.

    you can compile it through emacs, but i don't think its a particularly time-saving idea. a seperate console does the exact same thing.

  11. #11
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by Unregistered
    You can't be Troll_King. Quzah says that I'm Troll_King.
    Actually, a moderator clicked the nice little link that says "IP Logged" and found out that lo and behold, Troll_King's IP address was the same as someone posting as "unknown".

    Quzah.
    Hope is the first step on the road to disappointment.

  12. #12
    Registered User raimo's Avatar
    Join Date
    Jun 2002
    Posts
    107
    Make is a great tool for any coding.
    Code:
    $cat >Makefile
    program: program.o
                       g++ -o program program.cpp
    program.o: program.cpp
                       g++ -c program.cpp
    $make
    g++ -c program.cpp
    g++ -o program program.cpp
    $make
    make: Nothing to be done for `program'.
    $

  13. #13
    Unregistered
    Guest
    I don't know about you, but I don't appreciate the moderators and webmasters sending me email to porn sites, so I don't accept cookies here anymore.

    Thanks for the code. I haven't come accross programming in Linux yet, but it is enevitable especially since I have a few books on that topic not far away. If that is all there is to making a MAKE file, than it shouldn't be a problem. Great.

  14. #14
    geek SilentStrike's Avatar
    Join Date
    Aug 2001
    Location
    NJ
    Posts
    1,141
    Make is painful.. I know from personal experience .

    You might want to try KDevelop (comes with Red Hat 7.3) or Anjuta (dunno if it comes with it) to build/edit/debug your programs (much like Visual Studio).
    Prove you can code in C++ or C# at TopCoder, referrer rrenaud
    Read my livejournal

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. emacs characters size and feel
    By hamsteroid in forum Tech Board
    Replies: 10
    Last Post: 03-29-2007, 02:51 PM
  2. Emacs frames
    By frenchfry164 in forum Tech Board
    Replies: 2
    Last Post: 12-28-2003, 02:04 PM
  3. copying and pasting from emacs
    By curlious in forum Linux Programming
    Replies: 1
    Last Post: 12-13-2003, 10:08 PM
  4. Telnet Emacs
    By gnu-ehacks in forum Linux Programming
    Replies: 8
    Last Post: 12-10-2001, 01:02 PM
  5. configuring emacs
    By greenRoom in forum Linux Programming
    Replies: 2
    Last Post: 10-25-2001, 06:23 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21