Overview
Features
Download
Documentation
Community
Add-Ons & Services

Darwin Compile Issue

Please post support and help requests here.

Darwin Compile Issue

Postby barryr » 06 Jan 2009, 03:02

I am trying to get an application that compiles in Linux and Win32 under mingw to compile on Mac OS X Leopard 10.5.6. After inclusion of the Notification.h, notificationqueue.h and Event.h things went awry. Prior to this the project was compiling correctly. Below is the compilation error I am getting:
Code: Select all
g++ -c ../Src/ProxyApp.cpp -o ProxyHttp.so -I ../Include -I ~/Downloads/curl-7.19.2/include/curl/ -I ~/Downloads/poco-1.3.3p1/Foundation/include/Poco   -g3
/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*)’:
/usr/include/c++/4.0.0/bits/stl_algobase.h:300: error: ‘memmove’ is not a member of ‘std’
/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*)’:
/usr/include/c++/4.0.0/bits/stl_algobase.h:425: error: ‘memmove’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algobase.h: In function ‘void std::fill(unsigned char*, unsigned char*, const unsigned char&)’:
/usr/include/c++/4.0.0/bits/stl_algobase.h:577: error: ‘memset’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algobase.h: In function ‘void std::fill(signed char*, signed char*, const signed char&)’:
/usr/include/c++/4.0.0/bits/stl_algobase.h:585: error: ‘memset’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algobase.h: In function ‘void std::fill(char*, char*, const char&)’:
/usr/include/c++/4.0.0/bits/stl_algobase.h:593: error: ‘memset’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algobase.h: In function ‘bool std::lexicographical_compare(const unsigned char*, const unsigned char*, const unsigned char*, const unsigned char*)’:
/usr/include/c++/4.0.0/bits/stl_algobase.h:885: error: ‘memcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function ‘static typename __gnu_cxx::char_traits<_CharT>::char_type* __gnu_cxx::char_traits<_CharT>::move(_CharT*, const _CharT*, size_t)’:
/usr/include/c++/4.0.0/bits/char_traits.h:186: error: ‘memmove’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function ‘static int std::char_traits<char>::compare(const char*, const char*, size_t)’:
/usr/include/c++/4.0.0/bits/char_traits.h:253: error: ‘memcmp’ was not declared in this scope
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function ‘static size_t std::char_traits<char>::length(const char*)’:
/usr/include/c++/4.0.0/bits/char_traits.h:257: error: ‘strlen’ was not declared in this scope
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function ‘static const char* std::char_traits<char>::find(const char*, size_t, const char&)’:
/usr/include/c++/4.0.0/bits/char_traits.h:261: error: ‘memchr’ was not declared in this scope
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function ‘static char* std::char_traits<char>::move(char*, const char*, size_t)’:
/usr/include/c++/4.0.0/bits/char_traits.h:265: error: ‘memmove’ was not declared in this scope
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function ‘static char* std::char_traits<char>::copy(char*, const char*, size_t)’:
/usr/include/c++/4.0.0/bits/char_traits.h:269: error: ‘memcpy’ was not declared in this scope
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function ‘static char* std::char_traits<char>::assign(char*, size_t, char)’:
/usr/include/c++/4.0.0/bits/char_traits.h:273: error: ‘memset’ was not declared in this scope
/usr/include/c++/4.0.0/bits/stl_uninitialized.h: In function ‘char* std::uninitialized_copy(const char*, const char*, char*)’:
/usr/include/c++/4.0.0/bits/stl_uninitialized.h:119: error: ‘memmove’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_uninitialized.h: In function ‘wchar_t* std::uninitialized_copy(const wchar_t*, const wchar_t*, wchar_t*)’:
/usr/include/c++/4.0.0/bits/stl_uninitialized.h:127: error: ‘memmove’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.h: At global scope:
/usr/include/c++/4.0.0/bits/basic_string.h:2352: error: expected constructor, destructor, or type conversion before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.h:2366: error: expected constructor, destructor, or type conversion before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.h:2384: error: expected constructor, destructor, or type conversion before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.h:2401: error: expected initializer before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.h:2406: error: expected constructor, destructor, or type conversion before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.h:2412: error: expected constructor, destructor, or type conversion before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.tcc:968: error: explicit instantiation of non-template ‘int std::basic_istream’
/usr/include/c++/4.0.0/bits/basic_string.tcc:968: error: expected `;' before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.tcc:971: error: explicit instantiation of non-template ‘int std::basic_ostream’
/usr/include/c++/4.0.0/bits/basic_string.tcc:971: error: expected `;' before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.tcc:974: error: explicit instantiation of non-template ‘int std::basic_istream’
/usr/include/c++/4.0.0/bits/basic_string.tcc:974: error: expected `;' before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.tcc:977: error: explicit instantiation of non-template ‘int std::basic_istream’
/usr/include/c++/4.0.0/bits/basic_string.tcc:977: error: expected `;' before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.tcc:983: error: explicit instantiation of non-template ‘int std::basic_istream’
/usr/include/c++/4.0.0/bits/basic_string.tcc:983: error: expected `;' before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.tcc:986: error: explicit instantiation of non-template ‘int std::basic_ostream’
/usr/include/c++/4.0.0/bits/basic_string.tcc:986: error: expected `;' before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.tcc:989: error: explicit instantiation of non-template ‘int std::basic_istream’
/usr/include/c++/4.0.0/bits/basic_string.tcc:989: error: expected `;' before ‘<’ token
/usr/include/c++/4.0.0/bits/basic_string.tcc:992: error: explicit instantiation of non-template ‘int std::basic_istream’
/usr/include/c++/4.0.0/bits/basic_string.tcc:992: error: expected `;' before ‘<’ token
/Users/barryruffner/Downloads/poco-1.3.3p1/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/barryruffner/Downloads/poco-1.3.3p1/Foundation/include/Poco/string.h:466: error: ‘strlen’ is not a member of ‘std’
/usr/include/c++/4.0.0/cstring: At global scope:
/usr/include/c++/4.0.0/cstring:79: error: ‘::memcpy’ has not been declared
/usr/include/c++/4.0.0/cstring:80: error: ‘::memmove’ has not been declared
/usr/include/c++/4.0.0/cstring:81: error: ‘::strcpy’ has not been declared
/usr/include/c++/4.0.0/cstring:82: error: ‘::strncpy’ has not been declared
/usr/include/c++/4.0.0/cstring:83: error: ‘::strcat’ has not been declared
/usr/include/c++/4.0.0/cstring:84: error: ‘::strncat’ has not been declared
/usr/include/c++/4.0.0/cstring:85: error: ‘::memcmp’ has not been declared
/usr/include/c++/4.0.0/cstring:86: error: ‘::strcmp’ has not been declared
/usr/include/c++/4.0.0/cstring:87: error: ‘::strcoll’ has not been declared
/usr/include/c++/4.0.0/cstring:88: error: ‘::strncmp’ has not been declared
/usr/include/c++/4.0.0/cstring:89: error: ‘::strxfrm’ has not been declared
/usr/include/c++/4.0.0/cstring:90: error: ‘::strcspn’ has not been declared
/usr/include/c++/4.0.0/cstring:91: error: ‘::strspn’ has not been declared
/usr/include/c++/4.0.0/cstring:92: error: ‘::strtok’ has not been declared
/usr/include/c++/4.0.0/cstring:93: error: ‘::memset’ has not been declared
/usr/include/c++/4.0.0/cstring:94: error: ‘::strerror’ has not been declared
/usr/include/c++/4.0.0/cstring:95: error: ‘::strlen’ has not been declared
/usr/include/c++/4.0.0/cstring:97: error: ‘::memchr’ has not been declared
/usr/include/c++/4.0.0/cstring: In function ‘void* std::memchr(void*, int, size_t)’:
/usr/include/c++/4.0.0/cstring:101: error: invalid conversion from ‘const void*’ to ‘void*’
/usr/include/c++/4.0.0/cstring:101: error:   initializing argument 1 of ‘void* std::memchr(void*, int, size_t)’
/usr/include/c++/4.0.0/cstring: At global scope:
/usr/include/c++/4.0.0/cstring:103: error: ‘::strchr’ has not been declared
/usr/include/c++/4.0.0/cstring:109: error: ‘::strpbrk’ has not been declared
/usr/include/c++/4.0.0/cstring:115: error: ‘::strrchr’ has not been declared
/usr/include/c++/4.0.0/cstring:121: error: ‘::strstr’ has not been declared
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h: In function ‘int std::__convert_from_v(char*, int, const char*, _Tv, int* const&, int)’:
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h:64: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h:66: error: ‘strlen’ is not a member of ‘std’
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/c++locale.h:67: error: ‘strcpy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_classes.h: In member function ‘bool std::locale::_Impl::_M_check_same_name()’:
/usr/include/c++/4.0.0/bits/locale_classes.h:540: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.h: In member function ‘const char* std::ctype<char>::widen(const char*, const char*, char*) const’:
/usr/include/c++/4.0.0/bits/locale_facets.h:897: error: ‘memcpy’ was not declared in this scope
/usr/include/c++/4.0.0/bits/locale_facets.h: In member function ‘const char* std::ctype<char>::narrow(const char*, const char*, char, char*) const’:
/usr/include/c++/4.0.0/bits/locale_facets.h:962: error: ‘memcpy’ was not declared in this scope
/usr/include/c++/4.0.0/bits/locale_facets.h: In member function ‘virtual const char* std::ctype<char>::do_widen(const char*, const char*, char*) const’:
/usr/include/c++/4.0.0/bits/locale_facets.h:1099: error: ‘memcpy’ was not declared in this scope
/usr/include/c++/4.0.0/bits/locale_facets.h: In member function ‘virtual const char* std::ctype<char>::do_narrow(const char*, const char*, char, char*) const’:
/usr/include/c++/4.0.0/bits/locale_facets.h:1152: error: ‘memcpy’ was not declared in this scope
/usr/include/c++/4.0.0/bits/locale_facets.h: In member function ‘void std::ctype<char>::_M_widen_init() const’:
/usr/include/c++/4.0.0/bits/locale_facets.h:1167: error: ‘memcmp’ was not declared in this scope
/usr/include/c++/4.0.0/bits/locale_facets.h: In member function ‘void std::ctype<char>::_M_narrow_init() const’:
/usr/include/c++/4.0.0/bits/locale_facets.h:1182: error: ‘memcmp’ was not declared in this scope
/usr/include/c++/4.0.0/bits/codecvt.h: In constructor ‘std::codecvt_byname<_InternT, _ExternT, _StateT>::codecvt_byname(const char*, size_t)’:
/usr/include/c++/4.0.0/bits/codecvt.h:458: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/codecvt.h:458: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.h: In constructor ‘std::numpunct_byname<_CharT>::numpunct_byname(const char*, size_t)’:
/usr/include/c++/4.0.0/bits/locale_facets.h:1899: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.h:1899: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.h: In constructor ‘std::collate_byname<_CharT>::collate_byname(const char*, size_t)’:
/usr/include/c++/4.0.0/bits/locale_facets.h:2655: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.h:2655: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h: In constructor ‘std::__timepunct<_CharT>::__timepunct(int*, const char*, size_t)’:
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h:58: error: ‘strlen’ is not a member of ‘std’
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/time_members.h:59: error: ‘strcpy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.h: In constructor ‘std::moneypunct_byname<_CharT, _Intl>::moneypunct_byname(const char*, size_t)’:
/usr/include/c++/4.0.0/bits/locale_facets.h:3939: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.h:3939: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h: In constructor ‘std::messages_byname<_CharT>::messages_byname(const char*, size_t)’:
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h:79: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/i686-apple-darwin9/bits/messages_members.h:79: error: ‘strcmp’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/fstream.tcc: In member function ‘virtual typename std::basic_filebuf<_CharT, _Traits>::int_type std::basic_filebuf<_CharT, _Traits>::underflow()’:
/usr/include/c++/4.0.0/bits/fstream.tcc:249: error: ‘memcpy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/fstream.tcc:256: error: ‘memmove’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/fstream.tcc: In member function ‘virtual void std::basic_filebuf<_CharT, _Traits>::imbue(const std::locale&)’:
/usr/include/c++/4.0.0/bits/fstream.tcc:868: error: ‘memmove’ is not a member of ‘std’
make: *** [ProxyHttp.so] Error 1

I have tried including <cstring> and <cstddef> just to be sure they were being included. Please let me know if there is a fix for this or some way around it.

Thank you,
Barry R.
barryr
 
Posts: 2
Joined: 06 Jan 2009, 02:56

Re: Darwin Compile Issue

Postby barryr » 08 Jan 2009, 01:49

This is quite frustrating, is there any more information I can provide that would help? Please let me know since this problem only occurs on Mac.

Best Regards,
Barry R.
barryr
 
Posts: 2
Joined: 06 Jan 2009, 02:56

Re: Darwin Compile Issue

Postby simonjoyner » 17 Feb 2009, 09:27

Hi Barry

Have you had any more luck with this issue? I have encountered exactly the same problem today and am also quite frustrated.

Cheers

Simon
simonjoyner
 
Posts: 13
Joined: 17 Feb 2009, 09:24

Re: Darwin Compile Issue

Postby guenter » 17 Feb 2009, 14:44

Could someone provide a small piece of code that allows to reproduce the issue? We are doing regular builds on Mac OS X and haven't had any issues yet.
guenter
 
Posts: 1156
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Darwin Compile Issue

Postby simonjoyner » 18 Feb 2009, 10:47

If I add my poco folder to the project as an additional header path then simply having #include <cstring> will give errors. Seems like gcc4.0 might be getting confused between the standard string.h and Poco's String.h in Foundation. Bit of a newb here so hope that makes some sense...
simonjoyner
 
Posts: 13
Joined: 17 Feb 2009, 09:24

Re: Darwin Compile Issue

Postby guenter » 18 Feb 2009, 12:39

That may be the solution. I just saw that in Barry's error output, the directory Foundation/include/Poco has been added to the compiler's include search path. This is wrong. You should only add Foundation/include, XML/include, etc. to the compiler search path and then include all POCO headers with

Code: Select all
#include "Poco/String.h"
#include "Poco/Util/Application.h"


This should solve the compilation issue.
guenter
 
Posts: 1156
Joined: 11 Jul 2006, 16:27
Location: Austria

Re: Darwin Compile Issue

Postby simonjoyner » 18 Feb 2009, 22:33

Yes, I had the same setup and that fixes it for me. Thanks Guenter.
simonjoyner
 
Posts: 13
Joined: 17 Feb 2009, 09:24


Return to Support

Who is online

Users browsing this forum: No registered users and 2 guests