public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* help with g++ 2.96
@ 2003-09-22 16:11 ntk3
  0 siblings, 0 replies; 3+ messages in thread
From: ntk3 @ 2003-09-22 16:11 UTC (permalink / raw)
  To: gcc-help

Hello,

I am trying to compile lapack++ on RH 7.0 with g++ 2.96
I get the following error

ISO C++ forbids declaration of `inc' with no type

where inc is avariable used in one of the header files.

Please help


Nachiket Kasarekar
Mechanical Engineering Department
4441 Chestnut Ridge Road, #7
Amherst,NY 14228
Ph No - 716-903-5742

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

* Re: help with g++ 2.96
  2003-09-22 17:31 lrtaylor
@ 2003-09-22 17:56 ` Florian Weimer
  0 siblings, 0 replies; 3+ messages in thread
From: Florian Weimer @ 2003-09-22 17:56 UTC (permalink / raw)
  To: lrtaylor; +Cc: ntk3, gcc-help

On Mon, Sep 22, 2003 at 11:31:05AM -0600, lrtaylor@micron.com wrote:

> Is it a C header?  If so, try surrounding your include statement with
> 'extern "C" {' and '}' like this:
> 
> extern "C" {
> #include <incfile.h>
> }
> 
> This will cause that file to be compiled as C source code rather than
> C++ source code, which must follow stricter rules.

Not quite, the C++ syntax and semantics still apply, but the linking
convention is changed to "C".  Usually, it is possible to include a C
header this way, but additional care is necessary if the header uses C++
keywords.

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

* RE: help with g++ 2.96
@ 2003-09-22 17:31 lrtaylor
  2003-09-22 17:56 ` Florian Weimer
  0 siblings, 1 reply; 3+ messages in thread
From: lrtaylor @ 2003-09-22 17:31 UTC (permalink / raw)
  To: ntk3, gcc-help

Is it a C header?  If so, try surrounding your include statement with 'extern "C" {' and '}' like this:

extern "C" {
#include <incfile.h>
}

This will cause that file to be compiled as C source code rather than C++ source code, which must follow stricter rules.

Thanks,
Lyle Taylor
IS Applications

-----Original Message-----
From: ntk3@buffalo.edu [mailto:ntk3@buffalo.edu]
Sent: Monday, September 22, 2003 10:11 AM
To: gcc-help@gcc.gnu.org
Subject: help with g++ 2.96

Hello,

I am trying to compile lapack++ on RH 7.0 with g++ 2.96
I get the following error

ISO C++ forbids declaration of `inc' with no type

where inc is avariable used in one of the header files.

Please help


Nachiket Kasarekar
Mechanical Engineering Department
4441 Chestnut Ridge Road, #7
Amherst,NY 14228
Ph No - 716-903-5742

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

end of thread, other threads:[~2003-09-22 17:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-09-22 16:11 help with g++ 2.96 ntk3
2003-09-22 17:31 lrtaylor
2003-09-22 17:56 ` Florian Weimer

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