public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: C linkage when using C++
       [not found] <EF40D5BF9C48D411AA8E0008C7913EFB53F37A@mail15.monmouth.army.mil>
@ 2001-12-06 16:47 ` Joe Buck
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Buck @ 2001-12-06 16:47 UTC (permalink / raw)
  To: Altenau, Maureen D   CECOM RDEC C2D; +Cc: gcc

On Tue, 2001-12-04 at 07:17, Altenau, Maureen D CECOM RDEC C2D wrote:
> Hi,
> 
> I have attached two of the files that are creating errors.  The error I get
> is 
> "Template with C Linkage".  For some reason, the compiler thinks there is C
> Linkage, which if that is the case, causes certain C++ features to be
> flagged as errors.  This is the case with templates.  This is the first time
> I have used g++.  I thought that I may need to set a compiler option or a
> compiler directive to tell the compiler that there is no c linkage.  I did
> not see anything in the code such as extern "C" to indicate C linkage.  

Sorry, but this isn't a complete test case: the command line isn't given
and there are some headers that aren't included.  Because of this I
can't duplicate the error.  Please file a complete bug report; you can
find instructions on http://gcc.gnu.org/.  Please remember that in order
to help you, someone has to be able to duplicate *exactly* what you did.
The easiest way to make sure that all needed sources are present is to
send preprocessor output; also don't forget to send the exact command
line you typed and the exact error messages you got, not a paraphrase.

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

* Re: C linkage when using C++
  2001-12-03  9:48 Altenau, Maureen D CECOM RDEC C2D
@ 2001-12-03 12:05 ` Joe Buck
  0 siblings, 0 replies; 3+ messages in thread
From: Joe Buck @ 2001-12-03 12:05 UTC (permalink / raw)
  To: Altenau, Maureen D CECOM RDEC C2D; +Cc: 'gcc@gcc.gnu.org'


> I have downloaded gcc 3.0.2 from the Sun Freeware site.  I unzipped it and
> then used pkgadd to install it on a Sparc 2.5.1 system.  It seems that the
> installation went well.  I am trying to compile code that has templates and
> global functions that override the operator+ function.   With respect to the
> templates error, I get "Templates with C Linkage" and with respect to the
> operator+ functions I get an error that states that they "Conflict" with
> each other.  I do not have any extern "C" statements in my code.  Should I
> be setting a compiler switch that tells g++ that it is compiling C++?  Are
> there compiler directives that need to be defined?  Has anyone had a problem
> with this.  Any help would be greatly appreciated.

It's hard to make much sense of this without seeing code, or at least the
actual error messages rather than a paraphrase.  If you could
send a complete program that shows this failure it will be much easier to
track down the problem.

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

* C linkage when using C++
@ 2001-12-03  9:48 Altenau, Maureen D CECOM RDEC C2D
  2001-12-03 12:05 ` Joe Buck
  0 siblings, 1 reply; 3+ messages in thread
From: Altenau, Maureen D CECOM RDEC C2D @ 2001-12-03  9:48 UTC (permalink / raw)
  To: 'gcc@gcc.gnu.org'

I have downloaded gcc 3.0.2 from the Sun Freeware site.  I unzipped it and
then used pkgadd to install it on a Sparc 2.5.1 system.  It seems that the
installation went well.  I am trying to compile code that has templates and
global functions that override the operator+ function.   With respect to the
templates error, I get "Templates with C Linkage" and with respect to the
operator+ functions I get an error that states that they "Conflict" with
each other.  I do not have any extern "C" statements in my code.  Should I
be setting a compiler switch that tells g++ that it is compiling C++?  Are
there compiler directives that need to be defined?  Has anyone had a problem
with this.  Any help would be greatly appreciated.

Maureen Altenau
               

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

end of thread, other threads:[~2001-12-07  0:26 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <EF40D5BF9C48D411AA8E0008C7913EFB53F37A@mail15.monmouth.army.mil>
2001-12-06 16:47 ` C linkage when using C++ Joe Buck
2001-12-03  9:48 Altenau, Maureen D CECOM RDEC C2D
2001-12-03 12:05 ` Joe Buck

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