Fwd: ksycoca.cpp - error: duplicate `extern'

Waldo Bastian bastian at kde.org
Sat Jun 10 23:21:14 BST 2006


----------  Forwarded Message  ----------

Subject: ksycoca.cpp - error: duplicate `extern'
Date: Saturday 10 June 2006 11:46
From: "Sotiris Sotiropoulos" <sotiris.sotiropoulos at gmail.com>
To: bastian at kde.org

Dear Waldo,

During a compilation run of kdelibs version 3.5.3 under Solaris OS 10, the
following error has been
reported:

ksycoca.cpp:46: error: duplicate `extern'

A look into the file revealed:

#ifdef Q_OS_SOLARIS
extern "C" extern int madvise(caddr_t, size_t, int);      /* Line 46 */
#endif

I changed to:

#ifdef Q_OS_SOLARIS
extern "C" {
extern int madvise(caddr_t, size_t, int);
}
#endif

and it complied without problems.

I do not know if it is a GCC compiler problem or the {} curly brackets are
indeed necessary to separate the
two extern directives.

Some details on my hardware and software running:
CPU:AMD Athlon 64 3000+,
Physical memory: 2048 MB.

uname -a
SunOS unknown 5.10 Generic_118844-26 i86pc i386 i86pc

gcc -v
Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.10/3.4.3/specs
Configured with: /builds/sfw10-gate/usr/src/cmd/gcc/gcc-3.4.3/configure
--prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as
--with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++
--enable-shared
Thread model: posix
gcc version 3.4.3 (csl-sol210-3_4-branch+sol_rpath)

Thank you,

Sotiris.

-------------------------------------------------------

-- 
Linux Client Architect - Channel Platform Solutions Group - Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060611/34d4c820/attachment.sig>


More information about the kde-core-devel mailing list