This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: gcc 4.0.2, Fedora C4 problem


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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]