unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
* c++ mode chooses "cc" as linker and cause error
@ 2009-02-08 10:49 Michael Chen
  2009-02-08 11:07 ` Peter Dyballa
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Chen @ 2009-02-08 10:49 UTC (permalink / raw)
  To: Help-gnu-emacs

[-- Attachment #1: Type: text/plain, Size: 323 bytes --]

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.

-- 
Best regards,
Michael Chen

[-- Attachment #2: Type: text/html, Size: 418 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++ mode chooses "cc" as linker and cause error
  2009-02-08 10:49 Michael Chen
@ 2009-02-08 11:07 ` Peter Dyballa
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Dyballa @ 2009-02-08 11:07 UTC (permalink / raw)
  To: Michael Chen; +Cc: Help-gnu-emacs


Am 08.02.2009 um 11:49 schrieb Michael Chen:

> 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.

Make works only with a make-file. If you don't have and don't want to  
use a makefile, then simply substitute the text "make -k" with "g+ 
+ ...".

--
Greetings

   Pete

America believes in education: the average professor earns more money  
in a year than a professional athlete earns in a whole week.
				– Evan Esar








^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++ mode chooses "cc" as linker and cause error
       [not found] <mailman.132.1234090149.31690.help-gnu-emacs@gnu.org>
@ 2009-02-08 11:58 ` Phil Carmody
  2009-02-08 13:15 ` Dan Espen
  1 sibling, 0 replies; 4+ messages in thread
From: Phil Carmody @ 2009-02-08 11:58 UTC (permalink / raw)
  To: help-gnu-emacs

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.

Run 'make -k' from the command-line instead of from within emacs.

If it fails the same way, the problem is in your makefile and not
emacs' fault at all.

Phil
-- 
I tried the Vista speech recognition by running the tutorial. I was 
amazed, it was awesome, recognised every word I said. Then I said the 
wrong word ... and it typed the right one. It was actually just 
detecting a sound and printing the expected word! -- pbhj on /.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: c++ mode chooses "cc" as linker and cause error
       [not found] <mailman.132.1234090149.31690.help-gnu-emacs@gnu.org>
  2009-02-08 11:58 ` c++ mode chooses "cc" as linker and cause error Phil Carmody
@ 2009-02-08 13:15 ` Dan Espen
  1 sibling, 0 replies; 4+ messages in thread
From: Dan Espen @ 2009-02-08 13:15 UTC (permalink / raw)
  To: help-gnu-emacs

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".


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-02-08 13:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <mailman.132.1234090149.31690.help-gnu-emacs@gnu.org>
2009-02-08 11:58 ` c++ mode chooses "cc" as linker and cause error Phil Carmody
2009-02-08 13:15 ` Dan Espen
2009-02-08 10:49 Michael Chen
2009-02-08 11:07 ` Peter Dyballa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).