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]

Can somebody explain this?


Hi,

For my project i built a gcc-3.3.2 cross-compiler for the i386-elf target and use a third party's standard C & C++ libraries. While testing it out with a simple C++ "Hello World" example, i got the following error;

`operator new' takes type `size_t' (`long unsigned int') as first parameter.

My include paths are correct. After some head-scratching, i replaced the "size_t" type with its actual typedef value(as defined in the library) i.e. "unsigned long" and got around the error. But i do not understand why the error line shows 'size_t' as 'long unsigned int'. Some browsing on the web showed that many people also had come across that error, but i found no real explanation. 

Can somebody explain?

Thanks
Ram

Ramanathan Ramadass
Sr. Software Engineer,
Performance Analysis - Broadband,
Spirent Communications, 
Voice: 408-752-7310
Fax: 408-752-7186
mailto:ramanathan.ramadass@spirentcom.com
http://www.spirentcom.com






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