* gcc 4.0.2, Fedora C4 problem
@ 2006-07-12 16:08 Michael Gatford
2006-07-12 16:29 ` Andrew Haley
0 siblings, 1 reply; 3+ messages in thread
From: Michael Gatford @ 2006-07-12 16:08 UTC (permalink / raw)
To: gcc help
Hi,
I am getting the following error when compiling some code on a Fedora C4
box and gcc 4.0.2.
I've done some googling but have no idea how to deal with the "throws
different exceptions" errors.
Mike
g++ -Wall -Wunused -Wno-uninitialized -Wno-return-type
-fno-strength-reduce -O2 -DUNIX -DLINUX -DMACHINE=\"Linux-libc6.1\" -w
-Dstrerror=strerror -I. -I/home2/dependencies/Semaphore/JFS/3.2/include
-I/home2/dependencies/Semaphore/PowerQuery/1.5.22/include -c -o
Linux-libc6.1/FmUser.o FmUser.cxx
/usr/include/unistd.h:1026: error: declaration of ‘char* crypt(const
char*, const char*) throw ()Â’ throws different exceptions
crypt.h:104: error: than previous declaration ‘char* crypt(const char*,
const char*)Â’
/usr/include/unistd.h:1030: error: declaration of ‘void encrypt(char*,
int) throw ()Â’ throws different exceptions
crypt.h:111: error: than previous declaration ‘void encrypt(char*, int)’
/usr/include/stdlib.h:917: error: declaration of ‘void setkey(const
char*) throw ()Â’ throws different exceptions
crypt.h:107: error: than previous declaration ‘void setkey(const char*)’
FmUser.cxx: In member function ‘char* FmUser::makeKey() const’:
FmUser.cxx:372: error: no matching function for call to
‘transform(__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, <unknown type>)Â’
gmake: *** [Linux-libc6.1/FmUser.o] Error 1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: gcc 4.0.2, Fedora C4 problem
2006-07-12 16:08 gcc 4.0.2, Fedora C4 problem Michael Gatford
@ 2006-07-12 16:29 ` Andrew Haley
0 siblings, 0 replies; 3+ messages in thread
From: Andrew Haley @ 2006-07-12 16:29 UTC (permalink / raw)
To: Michael Gatford; +Cc: gcc help
Michael Gatford writes:
> Hi,
>
> I am getting the following error when compiling some code on a Fedora C4
> box and gcc 4.0.2.
>
> I've done some googling but have no idea how to deal with the "throws
> different exceptions" errors.
You've got multiple incompatible declarations of some functions. Find
out why, and fix them. Use gcc -E to get preprocessed source.
Andrew.
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: gcc 4.0.2, Fedora C4 problem
@ 2006-07-12 16:20 Brian D. McGrew
0 siblings, 0 replies; 3+ messages in thread
From: Brian D. McGrew @ 2006-07-12 16:20 UTC (permalink / raw)
To: Michael Gatford, gcc help
Hmmm, /usr/include/unistd.h defines crypt as
char *crypt(const char *, const char *) __THROW __nonnull
and chances are, the headers that your code in including are defining it
as something else. It's highly likely that you've not defined some
required tidbit on your compile line that's causing the pre-processor to
go the wrong direction.
Ie. Crypt is a pretty standard define on most Unix like OS's. So,
there may be something in your code similar to
#ifndef HAS_CRYPT
char *crypt(const char *, const char *) throw();
#endif
Which would indicate you're missing a compile time define.
:b!
Brian D. McGrew { brian@visionpro.com || brian@doubledimension.com }
--
> This is a test. This is only a test!
Had this been an actual emergency, you would have been
told to cancel this test and seek professional assistance!
-----Original Message-----
From: gcc-help-owner@gcc.gnu.org [mailto:gcc-help-owner@gcc.gnu.org] On
Behalf Of Michael Gatford
Sent: Wednesday, July 12, 2006 9:09 AM
To: gcc help
Subject: gcc 4.0.2, Fedora C4 problem
Hi,
I am getting the following error when compiling some code on a Fedora C4
box and gcc 4.0.2.
I've done some googling but have no idea how to deal with the "throws
different exceptions" errors.
Mike
g++ -Wall -Wunused -Wno-uninitialized -Wno-return-type
-fno-strength-reduce -O2 -DUNIX -DLINUX -DMACHINE=\"Linux-libc6.1\" -w
-Dstrerror=strerror -I. -I/home2/dependencies/Semaphore/JFS/3.2/include
-I/home2/dependencies/Semaphore/PowerQuery/1.5.22/include -c -o
Linux-libc6.1/FmUser.o FmUser.cxx
/usr/include/unistd.h:1026: error: declaration of 'char* crypt(const
char*, const char*) throw ()' throws different exceptions
crypt.h:104: error: than previous declaration 'char* crypt(const char*,
const char*)'
/usr/include/unistd.h:1030: error: declaration of 'void encrypt(char*,
int) throw ()' throws different exceptions
crypt.h:111: error: than previous declaration 'void encrypt(char*, int)'
/usr/include/stdlib.h:917: error: declaration of 'void setkey(const
char*) throw ()' throws different exceptions
crypt.h:107: error: than previous declaration 'void setkey(const char*)'
FmUser.cxx: In member function 'char* FmUser::makeKey() const':
FmUser.cxx:372: error: no matching function for call to
'transform(__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >,
__gnu_cxx::__normal_iterator<char*, std::basic_string<char,
std::char_traits<char>, std::allocator<char> > >, <unknown type>)'
gmake: *** [Linux-libc6.1/FmUser.o] Error 1
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2006-07-12 16:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-07-12 16:08 gcc 4.0.2, Fedora C4 problem Michael Gatford
2006-07-12 16:29 ` Andrew Haley
2006-07-12 16:20 Brian D. McGrew
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).