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

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

Re: c++ mode chooses "cc" as linker and cause error


From: Dan Espen
Subject: Re: c++ mode chooses "cc" as linker and cause error
Date: Sun, 08 Feb 2009 08:15:47 -0500
User-agent: Gnus/5.090015 (Oort Gnus v0.15) XEmacs/21.4 (Educational Television, i686-pc-linux)

Michael Chen <vancouver.michael@gmail.com> writes:

>    Dear there,
>    on my machine, "M-x compile" choose "make -k", which in turn choose
>    "g++" and "cc" for my cpp file. How can I ask emacs to pick "g++" as
>    linker as well. Note that for some files, I just don't want to write a
>    makefile for it, and expect default make -k to work properly. thanks.

When g++ sees the .cpp suffix it uses g++.

Emacs doesn't pick the linker.
You tell emacs to compile with make,
make picks the right compiler/linker from the suffix.

You can cusomize the emacs variable 'compile-command'
to default to something other than "make -k".


reply via email to

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