On Sep 20, 2007, at 3:03 PM, Alastair Houghton wrote:
On 20 Sep 2007, at 05:44, Apparao wrote:
Yes Alastatir, I have included iostream and cstring in my project prefix header file. Getting same compilation errors.
Which file is causing the compilation errors? Are they happening when processing the prefix header?
Yes.
If not, try adding #include <cstring> to the file where you're seeing the problem. If that works, there's a problem with your prefix header (e.g. perhaps you're only #including <cstring> if the code is Objective-C?)
cstring is already included in the corresponding C++ files exists at /Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/.
If you still can't figure it out, show us the contents of your prefix header.
Here is my Prefix header file contents:
#include <iostream>
#include <cstring>
#include "AFMacTypes.h"
If i comment all the header files inclusion in prefix header file, compiler shows following errors:
/Users/Appu/Desktop/Perforce/dev/main/DEV/Offshore/SRC2.0/AdPodder/PluginSDK/PluginCode/MacNetscapePodbridgePlugin/PodbridgePlugin/../../../../../PocoLibraries/include/Foundation/include/Poco/String.h: In function 'S& Poco::replaceInPlace(S&, const typename S::value_type*, const typename S::value_type*, typename S::size_type)':
/Users/Appu/Desktop/Perforce/dev/main/DEV/Offshore/SRC2.0/AdPodder/PluginSDK/PluginCode/MacNetscapePodbridgePlugin/PodbridgePlugin/../../../../../PocoLibraries/include/Foundation/include/Poco/String.h:467: error: 'strlen' is not a member of 'std'
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring: At global scope:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:79: error: '::memcpy' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:80: error: '::memmove' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:81: error: '::strcpy' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:82: error: '::strncpy' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:83: error: '::strcat' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:84: error: '::strncat' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:85: error: '::memcmp' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:86: error: '::strcmp' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:87: error: '::strcoll' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:88: error: '::strncmp' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:89: error: '::strxfrm' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:90: error: '::strcspn' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:91: error: '::strspn' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:92: error: '::strtok' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:93: error: '::memset' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:94: error: '::strerror' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:95: error: '::strlen' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:97: error: '::memchr' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring: In function 'void* std::memchr(void*, int, size_t)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:101: error: invalid conversion from 'const void*' to 'void*'
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:101: error: initializing argument 1 of 'void* std::memchr(void*, int, size_t)'
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring: At global scope:
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:103: error: '::strchr' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:109: error: '::strpbrk' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:115: error: '::strrchr' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/cstring:121: error: '::strstr' has not been declared
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/i686-apple-darwin8/bits/c++locale.h: In function 'int std::__convert_from_v(char*, int, const char*, _Tv, int* const&, int)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/i686-apple-darwin8/bits/c++locale.h:64: error: there are no arguments to 'strcmp' that depend on a template parameter, so a declaration of 'strcmp' must be available
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/i686-apple-darwin8/bits/c++locale.h:64: error: (if you use '-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/i686-apple-darwin8/bits/c++locale.h:66: error: there are no arguments to 'strlen' that depend on a template parameter, so a declaration of 'strlen' must be available
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/i686-apple-darwin8/bits/c++locale.h:67: error: there are no arguments to 'strcpy' that depend on a template parameter, so a declaration of 'strcpy' must be available
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h: In static member function 'static _Tp* std::__copy<true, std::random_access_iterator_tag>::copy(const _Tp*, const _Tp*, _Tp*)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h:300: error: 'memmove' is not a member of 'std'
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h: In static member function 'static _Tp* std::__copy_backward<true, std::random_access_iterator_tag>::copy_b(const _Tp*, const _Tp*, _Tp*)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h:425: error: 'memmove' is not a member of 'std'
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h: In function 'void std::fill(unsigned char*, unsigned char*, const unsigned char&)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h:577: error: 'memset' is not a member of 'std'
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h: In function 'void std::fill(signed char*, signed char*, const signed char&)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h:585: error: 'memset' is not a member of 'std'
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h: In function 'void std::fill(char*, char*, const char&)':
/Developer/SDKs/MacOSX10.4u.sdk/usr/include/c++/4.0.0/bits/stl_algobase.h:593: error: 'memset' is not a member of 'std'
Because of the size limitation, i have copied few of them.
Thanks & Regards,
- Apparao.