help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Newbie - Can't compile and run C program


From: Peter Dyballa
Subject: Re: Newbie - Can't compile and run C program
Date: Sun, 18 Mar 2012 22:57:40 +0100

Am 18.3.2012 um 22:11 schrieb taariqq:

> When I do
> M-x compile RET hello.c RET
> the window that opens is not compilation or anything. It is a new instance
> of emacs that opens up  (I have .c files associated with emacs) with the
> same code for hello.c displayed in it.

Because you're obviously running MS Losedos and since you do perform a compile 
action "apply C source file" a new instance of GNU Emacs is created to fulfil 
this.

As I wrote: don't "hello.c" something but compile it! At least me, I do not 
know of a C compiler named "hello.c". And this compiler seems to extremely 
clever, knowing which file to compile, how to compile it (32-bit/64-bit, object 
file, shared or static library, or executable).

To be more precise: I would M-x compile RET gcc  -I/opt/local/include 
-L/opt/local/lib -fconstant-cfstrings -DHAVE_CONFIG_H -I. -I../src 
-I.../emacs-23.4-mac-2.0/lib-src -I.../emacs-23.4-mac-2.0/lib-src/../src 
-Wl,-dead_strip_dylibs -Wl,-bind_at_load -Wl,-t   -v -g -H -pipe -fPIC 
-fno-common -Os -m64 -march=core2 -mtune=core2 -fomit-frame-pointer -msse4.2 
.../emacs-23.4-mac-2.0/lib-src/digest-doc.c  -o digest-doc RET

--
Greetings

  Pete

If we don't succeed, we run the risk of failure.
                                – George W. Bush




reply via email to

[Prev in Thread] Current Thread [Next in Thread]