Find the answer to your Linux question:
Results 1 to 7 of 7
Hi I have been trying to use e-macs for programming i made the most simple program that can be made to test it out ie the "hello world" program i ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux User
    Join Date
    Nov 2002
    Posts
    420

    Using E-macs I Have A Problem!


    Hi

    I have been trying to use e-macs for programming i made the most simple program that can be made to test it out ie the "hello world" program i then made a program to print integers of 2 ie 2,4,6,8,10 etc

    But i had a problem with the compiling, i went to tools clicked compile and each time all i heard was a single beep noise, the program was no where to be seen. I am not sure if the printf statement is one to display "hello world" or actually to print it out, if it is to print it out perhaps i dont have a linux compatible printer.

    Please help.

  2. #2
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    First, emacs is emacs without the dash.
    I forget how to compile in emacs without using a makefile but I suppose that if you do compile, you will get an executable file called a.out (if you are using gcc or g++). Check if that file is in your working directory in which you compiled the source. What does emacs say when you hit compile?
    The best things in life are free.

  3. #3
    Linux Guru
    Join Date
    Oct 2001
    Location
    Täby, Sweden
    Posts
    7,578
    I really don't think emacs will compile anything at all without a Makefile. I'm not really sure about that menubar command, but I think it just calls emacs' compile command, which just calls make as it is.

  4. #4
    Linux User
    Join Date
    Nov 2002
    Posts
    420
    When i try to click the compile button nothing happens only a beep and nothing else at all.

  5. #5
    Just Joined!
    Join Date
    Jun 2003
    Location
    Helsinki, Finland
    Posts
    78
    Try typing the following in the directory with the source code.
    Code:
    $ make myProg
    (change myProg to your program name. My example will work if the C file is called myProg.c )

  6. #6
    Linux Engineer
    Join Date
    Nov 2002
    Location
    Queens, NY
    Posts
    1,319
    Won't he need to make a makefile first?
    The best things in life are free.

  7. #7
    Just Joined!
    Join Date
    Jun 2003
    Location
    Helsinki, Finland
    Posts
    78
    Nope. Make seems to have some default rules.

    If you say "make myProg" and there happens to be a myProg.c file laying about, it'll build an executable myProg from myProg.c

Posting Permissions

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