<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[std::string und andere std::-Typen auf dem Mac ?]]></title><description><![CDATA[<p>Servus,</p>
<p>ich hab hier Code der auf Windows und Linux anstandslos kompiliert, auf einem Intel-Mac aber ums verrecken nicht kompiliert, wenn ich includes aus der Standardbibliothek verwende.</p>
<p>Beispiel: Ich inklude string und mache eine Klasse die einen std::string als member hat.<br />
Habe gegoogelt und verschiedene tipps gefunden, &quot;using namespace std&quot; zu machen. Aber genau das will ich nicht. Ich mache keine namespace angabe und schreibe immer brav std:: davor!<br />
Zweiter tipp war, dass man &quot;rekursives inkluden&quot; einstellen soll. Was ist das und wie geht das bem gcc?</p>
<p>Folgende Meldung beim kompilieren:</p>
<pre><code>g++ -c -pipe -Wall -Wextra -Wnon-virtual-dtor -Os -Wall -W -fPIC -D__cplusplus -DAPL=1 -DIBM=0 -DLIN=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.4.0/mkspecs/macx-g++ -I. -I/usr/local/Trolltech/Qt-4.4.0/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Trolltech/Qt-4.4.0/include/QtCore -I/usr/local/Trolltech/Qt-4.4.0/include/QtCore -I/usr/local/Trolltech/Qt-4.4.0/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Trolltech/Qt-4.4.0/include/QtNetwork -I/usr/local/Trolltech/Qt-4.4.0/include/QtNetwork -I/usr/local/Trolltech/Qt-4.4.0/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/include -Iinclude/XPLM -I../vaslib/src -I. -I. -F/usr/local/Trolltech/Qt-4.4.0/lib -o datacontainer.o datacontainer.cpp
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function ‘static typename __gnu_cxx::char_traits&lt;_CharT&gt;::char_type* __gnu_cxx::char_traits&lt;_CharT&gt;::copy(_CharT*, const _CharT*, size_t)’:
/usr/include/c++/4.0.0/bits/char_traits.h:195: error: ‘copy’ 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&lt;_CharT&gt;::char_type* __gnu_cxx::char_traits&lt;_CharT&gt;::assign(_CharT*, size_t, _CharT)’:
/usr/include/c++/4.0.0/bits/char_traits.h:204: error: ‘fill_n’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::__uninitialized_copy_aux(_InputIterator, _InputIterator, _ForwardIterator, __true_type)’:
/usr/include/c++/4.0.0/bits/stl_uninitialized.h:74: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_uninitialized.h: In function ‘void std::__uninitialized_fill_aux(_ForwardIterator, _ForwardIterator, const _Tp&amp;, __true_type)’:
/usr/include/c++/4.0.0/bits/stl_uninitialized.h:138: error: ‘fill’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_uninitialized.h: In function ‘void std::__uninitialized_fill_n_aux(_ForwardIterator, _Size, const _Tp&amp;, __true_type)’:
/usr/include/c++/4.0.0/bits/stl_uninitialized.h:183: error: ‘fill_n’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.h: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;) const’:
/usr/include/c++/4.0.0/bits/basic_string.h:1917: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_ForwardIterator2 std::swap_ranges(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:756: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__reverse(_BidirectionalIterator, _BidirectionalIterator, std::bidirectional_iterator_tag)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1422: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, std::random_access_iterator_tag)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1444: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::rotate_copy(_ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1739: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::random_shuffle(_RandomAccessIterator, _RandomAccessIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1763: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::random_shuffle(_RandomAccessIterator, _RandomAccessIterator, _RandomNumberGenerator&amp;)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1792: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_BidirectionalIterator std::__partition(_BidirectionalIterator, _BidirectionalIterator, _Predicate, std::bidirectional_iterator_tag)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1854: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_ForwardIterator std::__stable_partition_adaptive(_ForwardIterator, _ForwardIterator, _Predicate, _Distance, _Pointer, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1947: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, _Tp)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2038: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, _Tp, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2063: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2136: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2162: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2830: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2879: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::merge(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3008: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3008: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::merge(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3067: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3067: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_sort_loop(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3089: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_sort_loop(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _Distance, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3112: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_BidirectionalIterator3 std::__merge_backward(_BidirectionalIterator1, _BidirectionalIterator1, _BidirectionalIterator2, _BidirectionalIterator2, _BidirectionalIterator3)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3215: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3217: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3226: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3233: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_BidirectionalIterator3 std::__merge_backward(_BidirectionalIterator1, _BidirectionalIterator1, _BidirectionalIterator2, _BidirectionalIterator2, _BidirectionalIterator3, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3255: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3257: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3266: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3273: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_BidirectionalIterator1 std::__rotate_adaptive(_BidirectionalIterator1, _BidirectionalIterator1, _BidirectionalIterator1, _Distance, _Distance, _BidirectionalIterator2, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3297: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3298: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3299: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3303: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3304: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3305: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_adaptive(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Pointer, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3331: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3336: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_adaptive(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Pointer, _Distance, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3391: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3396: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_union(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4123: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:4123: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_union(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4186: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:4186: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_difference(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4348: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_difference(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4407: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_symmetric_difference(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4464: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:4464: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_symmetric_difference(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4527: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:4527: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘bool std::next_permutation(_BidirectionalIterator, _BidirectionalIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4684: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘bool std::next_permutation(_BidirectionalIterator, _BidirectionalIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4741: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘bool std::prev_permutation(_BidirectionalIterator, _BidirectionalIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4795: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘bool std::prev_permutation(_BidirectionalIterator, _BidirectionalIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4852: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘typename std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::rfind(const _CharT*, typename _Alloc::size_type, typename _Alloc::size_type) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:753: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(typename _Alloc::size_type, typename _Alloc::size_type, const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:890: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(typename _Alloc::size_type, typename _Alloc::size_type, const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;, typename _Alloc::size_type, typename _Alloc::size_type) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:907: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(const _CharT*) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:923: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(typename _Alloc::size_type, typename _Alloc::size_type, const _CharT*) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:939: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(typename _Alloc::size_type, typename _Alloc::size_type, const _CharT*, typename _Alloc::size_type) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:955: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/streambuf.tcc: In member function ‘virtual std::streamsize std::basic_streambuf&lt;_CharT, _Traits&gt;::xsgetn(_CharT*, std::streamsize)’:
/usr/include/c++/4.0.0/bits/streambuf.tcc:59: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/streambuf.tcc: In member function ‘virtual std::streamsize std::basic_streambuf&lt;_CharT, _Traits&gt;::xsputn(const _CharT*, std::streamsize)’:
/usr/include/c++/4.0.0/bits/streambuf.tcc:93: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.tcc: In member function ‘_InIter std::time_get&lt;_CharT, _InIter&gt;::_M_extract_name(_InIter, _InIter, int&amp;, const _CharT**, size_t, std::ios_base&amp;, std::_Ios_Iostate&amp;) const’:
/usr/include/c++/4.0.0/bits/locale_facets.tcc:2048: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.tcc: In function ‘bool std::__verify_grouping(const char*, size_t, const std::string&amp;)’:
/usr/include/c++/4.0.0/bits/locale_facets.tcc:2490: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/istream.tcc: In member function ‘std::streamsize std::basic_istream&lt;_CharT, _Traits&gt;::readsome(_CharT*, std::streamsize)’:
/usr/include/c++/4.0.0/bits/istream.tcc:847: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_list.h: In function ‘bool std::operator&lt;(const std::list&lt;_Tp, _Alloc&gt;&amp;, const std::list&lt;_Tp, _Alloc&gt;&amp;)’:
/usr/include/c++/4.0.0/bits/stl_list.h:1208: error: ‘lexicographical_compare’ is not a member of ‘std’
</code></pre>
<p>Wie ihr sehen könnt, wird noch nicht einmal auf die Zeile in meinem Code hingewiesen, aus der der Fehler kommt, es geht gleich mit &quot;copy is not a member of std&quot; los.</p>
<p>EDIT: Hier noch die gcc-version:</p>
<pre><code>gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)
</code></pre>
<p>Plz help</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/233055/std-string-und-andere-std-typen-auf-dem-mac</link><generator>RSS for Node</generator><lastBuildDate>Sat, 19 Sep 2026 21:11:46 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/233055.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 30 Jan 2009 20:38:25 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 20:40:58 GMT]]></title><description><![CDATA[<p>Servus,</p>
<p>ich hab hier Code der auf Windows und Linux anstandslos kompiliert, auf einem Intel-Mac aber ums verrecken nicht kompiliert, wenn ich includes aus der Standardbibliothek verwende.</p>
<p>Beispiel: Ich inklude string und mache eine Klasse die einen std::string als member hat.<br />
Habe gegoogelt und verschiedene tipps gefunden, &quot;using namespace std&quot; zu machen. Aber genau das will ich nicht. Ich mache keine namespace angabe und schreibe immer brav std:: davor!<br />
Zweiter tipp war, dass man &quot;rekursives inkluden&quot; einstellen soll. Was ist das und wie geht das bem gcc?</p>
<p>Folgende Meldung beim kompilieren:</p>
<pre><code>g++ -c -pipe -Wall -Wextra -Wnon-virtual-dtor -Os -Wall -W -fPIC -D__cplusplus -DAPL=1 -DIBM=0 -DLIN=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.4.0/mkspecs/macx-g++ -I. -I/usr/local/Trolltech/Qt-4.4.0/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Trolltech/Qt-4.4.0/include/QtCore -I/usr/local/Trolltech/Qt-4.4.0/include/QtCore -I/usr/local/Trolltech/Qt-4.4.0/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Trolltech/Qt-4.4.0/include/QtNetwork -I/usr/local/Trolltech/Qt-4.4.0/include/QtNetwork -I/usr/local/Trolltech/Qt-4.4.0/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/include -Iinclude/XPLM -I../vaslib/src -I. -I. -F/usr/local/Trolltech/Qt-4.4.0/lib -o datacontainer.o datacontainer.cpp
/usr/include/c++/4.0.0/bits/char_traits.h: In static member function ‘static typename __gnu_cxx::char_traits&lt;_CharT&gt;::char_type* __gnu_cxx::char_traits&lt;_CharT&gt;::copy(_CharT*, const _CharT*, size_t)’:
/usr/include/c++/4.0.0/bits/char_traits.h:195: error: ‘copy’ 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&lt;_CharT&gt;::char_type* __gnu_cxx::char_traits&lt;_CharT&gt;::assign(_CharT*, size_t, _CharT)’:
/usr/include/c++/4.0.0/bits/char_traits.h:204: error: ‘fill_n’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_uninitialized.h: In function ‘_ForwardIterator std::__uninitialized_copy_aux(_InputIterator, _InputIterator, _ForwardIterator, __true_type)’:
/usr/include/c++/4.0.0/bits/stl_uninitialized.h:74: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_uninitialized.h: In function ‘void std::__uninitialized_fill_aux(_ForwardIterator, _ForwardIterator, const _Tp&amp;, __true_type)’:
/usr/include/c++/4.0.0/bits/stl_uninitialized.h:138: error: ‘fill’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_uninitialized.h: In function ‘void std::__uninitialized_fill_n_aux(_ForwardIterator, _Size, const _Tp&amp;, __true_type)’:
/usr/include/c++/4.0.0/bits/stl_uninitialized.h:183: error: ‘fill_n’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.h: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;) const’:
/usr/include/c++/4.0.0/bits/basic_string.h:1917: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_ForwardIterator2 std::swap_ranges(_ForwardIterator1, _ForwardIterator1, _ForwardIterator2)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:756: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__reverse(_BidirectionalIterator, _BidirectionalIterator, std::bidirectional_iterator_tag)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1422: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__reverse(_RandomAccessIterator, _RandomAccessIterator, std::random_access_iterator_tag)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1444: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::rotate_copy(_ForwardIterator, _ForwardIterator, _ForwardIterator, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1739: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::random_shuffle(_RandomAccessIterator, _RandomAccessIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1763: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::random_shuffle(_RandomAccessIterator, _RandomAccessIterator, _RandomNumberGenerator&amp;)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1792: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_BidirectionalIterator std::__partition(_BidirectionalIterator, _BidirectionalIterator, _Predicate, std::bidirectional_iterator_tag)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1854: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_ForwardIterator std::__stable_partition_adaptive(_ForwardIterator, _ForwardIterator, _Predicate, _Distance, _Pointer, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:1947: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, _Tp)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2038: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, _Tp, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2063: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2136: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2162: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2830: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_without_buffer(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:2879: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::merge(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3008: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3008: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::merge(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3067: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3067: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_sort_loop(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3089: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_sort_loop(_RandomAccessIterator1, _RandomAccessIterator1, _RandomAccessIterator2, _Distance, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3112: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_BidirectionalIterator3 std::__merge_backward(_BidirectionalIterator1, _BidirectionalIterator1, _BidirectionalIterator2, _BidirectionalIterator2, _BidirectionalIterator3)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3215: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3217: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3226: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3233: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_BidirectionalIterator3 std::__merge_backward(_BidirectionalIterator1, _BidirectionalIterator1, _BidirectionalIterator2, _BidirectionalIterator2, _BidirectionalIterator3, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3255: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3257: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3266: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3273: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_BidirectionalIterator1 std::__rotate_adaptive(_BidirectionalIterator1, _BidirectionalIterator1, _BidirectionalIterator1, _Distance, _Distance, _BidirectionalIterator2, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3297: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3298: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3299: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3303: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3304: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3305: error: ‘copy_backward’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_adaptive(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Pointer, _Distance)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3331: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3336: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘void std::__merge_adaptive(_BidirectionalIterator, _BidirectionalIterator, _BidirectionalIterator, _Distance, _Distance, _Pointer, _Distance, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:3391: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:3396: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_union(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4123: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:4123: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_union(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4186: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:4186: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_difference(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4348: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_difference(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4407: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_symmetric_difference(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4464: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:4464: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘_OutputIterator std::set_symmetric_difference(_InputIterator1, _InputIterator1, _InputIterator2, _InputIterator2, _OutputIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4527: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h:4527: error: ‘copy’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘bool std::next_permutation(_BidirectionalIterator, _BidirectionalIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4684: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘bool std::next_permutation(_BidirectionalIterator, _BidirectionalIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4741: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘bool std::prev_permutation(_BidirectionalIterator, _BidirectionalIterator)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4795: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_algo.h: In function ‘bool std::prev_permutation(_BidirectionalIterator, _BidirectionalIterator, _Compare)’:
/usr/include/c++/4.0.0/bits/stl_algo.h:4852: error: ‘iter_swap’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘typename std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::size_type std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::rfind(const _CharT*, typename _Alloc::size_type, typename _Alloc::size_type) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:753: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(typename _Alloc::size_type, typename _Alloc::size_type, const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:890: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(typename _Alloc::size_type, typename _Alloc::size_type, const std::basic_string&lt;_CharT, _Traits, _Alloc&gt;&amp;, typename _Alloc::size_type, typename _Alloc::size_type) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:907: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(const _CharT*) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:923: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(typename _Alloc::size_type, typename _Alloc::size_type, const _CharT*) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:939: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/basic_string.tcc: In member function ‘int std::basic_string&lt;_CharT, _Traits, _Alloc&gt;::compare(typename _Alloc::size_type, typename _Alloc::size_type, const _CharT*, typename _Alloc::size_type) const’:
/usr/include/c++/4.0.0/bits/basic_string.tcc:955: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/streambuf.tcc: In member function ‘virtual std::streamsize std::basic_streambuf&lt;_CharT, _Traits&gt;::xsgetn(_CharT*, std::streamsize)’:
/usr/include/c++/4.0.0/bits/streambuf.tcc:59: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/streambuf.tcc: In member function ‘virtual std::streamsize std::basic_streambuf&lt;_CharT, _Traits&gt;::xsputn(const _CharT*, std::streamsize)’:
/usr/include/c++/4.0.0/bits/streambuf.tcc:93: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.tcc: In member function ‘_InIter std::time_get&lt;_CharT, _InIter&gt;::_M_extract_name(_InIter, _InIter, int&amp;, const _CharT**, size_t, std::ios_base&amp;, std::_Ios_Iostate&amp;) const’:
/usr/include/c++/4.0.0/bits/locale_facets.tcc:2048: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/locale_facets.tcc: In function ‘bool std::__verify_grouping(const char*, size_t, const std::string&amp;)’:
/usr/include/c++/4.0.0/bits/locale_facets.tcc:2490: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/istream.tcc: In member function ‘std::streamsize std::basic_istream&lt;_CharT, _Traits&gt;::readsome(_CharT*, std::streamsize)’:
/usr/include/c++/4.0.0/bits/istream.tcc:847: error: ‘min’ is not a member of ‘std’
/usr/include/c++/4.0.0/bits/stl_list.h: In function ‘bool std::operator&lt;(const std::list&lt;_Tp, _Alloc&gt;&amp;, const std::list&lt;_Tp, _Alloc&gt;&amp;)’:
/usr/include/c++/4.0.0/bits/stl_list.h:1208: error: ‘lexicographical_compare’ is not a member of ‘std’
</code></pre>
<p>Wie ihr sehen könnt, wird noch nicht einmal auf die Zeile in meinem Code hingewiesen, aus der der Fehler kommt, es geht gleich mit &quot;copy is not a member of std&quot; los.</p>
<p>EDIT: Hier noch die gcc-version:</p>
<pre><code>gcc -v
Using built-in specs.
Target: i686-apple-darwin9
Configured with: /var/tmp/gcc/gcc-5465~16/src/configure --disable-checking -enable-werror --prefix=/usr --mandir=/share/man --enable-languages=c,objc,c++,obj-c++ --program-transform-name=/^[cg][^.-]*$/s/$/-4.0/ --with-gxx-include-dir=/include/c++/4.0.0 --with-slibdir=/usr/lib --build=i686-apple-darwin9 --with-arch=apple --with-tune=generic --host=i686-apple-darwin9 --target=i686-apple-darwin9
Thread model: posix
gcc version 4.0.1 (Apple Inc. build 5465)
</code></pre>
<p>Plz help</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655219</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655219</guid><dc:creator><![CDATA[PhilippM]]></dc:creator><pubDate>Fri, 30 Jan 2009 20:40:58 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 21:08:57 GMT]]></title><description><![CDATA[<p>Du solltest trotzdem mal deinen Code zeigen.</p>
<p>Klappt den das kompilieren einer einfachen Datei, ohne QT-Zeugs?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655223</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655223</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Fri, 30 Jan 2009 21:08:57 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 21:20:08 GMT]]></title><description><![CDATA[<p>Das lustige ist, das sämtliches QT-geraffel anstandslos kompiliert. Es kracht in einer Stelle des Projekts, wo meilenweit kein Qt ist, nur standard-template-library sachen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655227</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655227</guid><dc:creator><![CDATA[PhilippM]]></dc:creator><pubDate>Fri, 30 Jan 2009 21:20:08 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 21:23:56 GMT]]></title><description><![CDATA[<p>The-Kenny schrieb:</p>
<blockquote>
<p>Du solltest trotzdem mal deinen Code zeigen.</p>
<p>Klappt den das kompilieren einer einfachen Datei, ohne QT-Zeugs?</p>
</blockquote>
<p>Wenn das zuviel verlangt ist, kannst du mal probieren die neueste Xcode-Version (und damit GCC 4.2.1) zu installieren, und es damit zu probieren.</p>
<p>(Auch wenn ich hier nie Probleme mit 4.0.1 hatte)</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655230</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655230</guid><dc:creator><![CDATA[The-Kenny]]></dc:creator><pubDate>Fri, 30 Jan 2009 21:23:56 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 21:32:44 GMT]]></title><description><![CDATA[<p>möglich, dass irgendwas mit dem Projekteinstellungen oder der Konfiguration Deiner Entwicklungsumgebung nicht passt.</p>
<p>Probier' bitte mal ein kleines cpp-File (innerhalb Deines Projekts) zu übersetzen, in dem eine Funktion und/oder Klasse mit std::string drin vorkommt.</p>
<p>Gruß<br />
Werner</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655232</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655232</guid><dc:creator><![CDATA[Werner Salomon]]></dc:creator><pubDate>Fri, 30 Jan 2009 21:32:44 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 21:41:22 GMT]]></title><description><![CDATA[<p>Also wenn ich dieses hier mache:</p>
<pre><code class="language-cpp">#include &lt;string&gt;

class foo{
std::string bar;
};
</code></pre>
<p>und dann gcc -o test.o test.cpp</p>
<p>kompiliert das anstandslos.</p>
<p>Ich habe hier eher das Gefühl dass die Build-reihenfolge nicht stimmt:<br />
die oben angesprochene Datei sieht so aus:</p>
<pre><code class="language-cpp">#ifndef datacontainer_h
#define datacontainer_h

#include &lt;vector&gt;
#include &lt;utility&gt;
#include &lt;queue&gt;
#include &lt;iostream&gt;

#include &quot;datatosend.h&quot;

using std::pair;
using std::queue;

template &lt;typename T&gt;
class DataContainer : private std::vector&lt;DataToSend&lt;T&gt; &gt; {

 public:

    DataContainer();

    void addDataRef(unsigned char id, short readWrite, const std::string&amp; name,
                            const std::string&amp; dataRefIdentifier, unsigned char prio = PrioType::Constant,
                            double eps=2^(-8), double scale = 1.0, double offset = 0.0)

// verschiedenes anderes zeugs.

};
</code></pre>
<p>Mein gesunder Menschenverstand sagt mir, dass er ja zuerstmal die datatosend bauen müsste, bevor er den datacontainer anfängt. Macht er aber nicht. Er fängt an mit dieser Datei und scheitert (vermutlich) am std::string.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655238</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655238</guid><dc:creator><![CDATA[PhilippM]]></dc:creator><pubDate>Fri, 30 Jan 2009 21:41:22 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 22:09:21 GMT]]></title><description><![CDATA[<p>Werner Salomon schrieb:</p>
<blockquote>
<p>möglich, dass irgendwas mit dem Projekteinstellungen oder der Konfiguration Deiner Entwicklungsumgebung nicht passt.</p>
<p>Probier' bitte mal ein kleines cpp-File (innerhalb Deines Projekts) zu übersetzen, in dem eine Funktion und/oder Klasse mit std::string drin vorkommt.</p>
<p>Gruß<br />
Werner</p>
</blockquote>
<p>guter input!</p>
<p>Habe meinem Projekt eine Klasse test hizugefügt:</p>
<pre><code class="language-cpp">test.cpp:
#include &quot;test.h&quot;

test.h:
#ifndef TEST_H
#define TEST_H

#include &lt;string&gt;

class Test
{
public:
    Test();
    private:
    std::string foo;
};

#endif // TEST_H
</code></pre>
<p>ausgabe:</p>
<pre><code>g++ -c -pipe -Wall -Wextra -Wnon-virtual-dtor -Os -Wall -W -fPIC -D__cplusplus -DAPL=1 -DIBM=0 -DLIN=0 -DQT_NO_DEBUG -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB -DQT_SHARED -I/usr/local/Trolltech/Qt-4.4.0/mkspecs/macx-g++ -I. -I/usr/local/Trolltech/Qt-4.4.0/lib/QtCore.framework/Versions/4/Headers -I/usr/local/Trolltech/Qt-4.4.0/include/QtCore -I/usr/local/Trolltech/Qt-4.4.0/include/QtCore -I/usr/local/Trolltech/Qt-4.4.0/lib/QtNetwork.framework/Versions/4/Headers -I/usr/local/Trolltech/Qt-4.4.0/include/QtNetwork -I/usr/local/Trolltech/Qt-4.4.0/include/QtNetwork -I/usr/local/Trolltech/Qt-4.4.0/lib/QtGui.framework/Versions/4/Headers -I/usr/local/Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/include/QtGui -I/usr/local/Trolltech/Qt-4.4.0/include -Iinclude/XPLM -I../vaslib/src -I. -I. -F/usr/local/Trolltech/Qt-4.4.0/lib -o test.o test.cpp
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qstring.h: In member function ‘std::string QString::toStdString() const’:
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qstring.h:991: error: return type ‘struct std::string’ is incomplete
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qstring.h:992: error: invalid use of undefined type ‘struct std::string’
/usr/include/c++/4.0.0/bits/stringfwd.h:56: error: declaration of ‘struct std::string’
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qstring.h: In static member function ‘static QString QString::fromStdString(const std::string&amp;)’:
/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qstring.h:995: error: invalid use of undefined type ‘const struct std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;’
/usr/include/c++/4.0.0/bits/stringfwd.h:56: error: declaration of ‘const struct std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt;’

usw. usw.
</code></pre>
<p>Seitens der Entwicklungsumgebung hab ich nichts einzustelle, ich kompiliere von der kommandozeile. qmake macht mir das makefile und dann mach ich darauf make.</p>
<p>EDIT: <a class="plugin-mentions-user plugin-mentions-a" href="https://www.c-plusplus.net/forum/uid/34755">@Xcode</a>: XCode 3.1.2 : 530 of 996MB (679KB/sec) - 11 Minutes Remaining<br />
Müssen entwicklngsumgebungen sooo groß sein??? Warum können die nicht einfach einen download von gcc 4.3.3 für apple anbieten...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655241</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655241</guid><dc:creator><![CDATA[PhilippM]]></dc:creator><pubDate>Fri, 30 Jan 2009 22:09:21 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 22:05:57 GMT]]></title><description><![CDATA[<p>Könntest du bitte darauf verzichten überlange Fehlerlogs zu posten. In der Regel reichen die ersten 5-10 Zeilen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655249</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655249</guid><dc:creator><![CDATA[asc]]></dc:creator><pubDate>Fri, 30 Jan 2009 22:05:57 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 22:15:26 GMT]]></title><description><![CDATA[<p>Wie kann es sein, dass nach einem einsamen #include &lt;string&gt; eine Meldung aus</p>
<pre><code>/usr/local/Trolltech/Qt-4.4.0/include/QtCore/qstring.h:991: ...
</code></pre>
<p>erscheint.<br />
Kann es sein, dass Du eine Datei 'string' irgendwo rumliegen hast, die da gar nicht hingehört und die dann auch noch Dinge aus QT inkludiert. Also ist die &lt;string&gt;-Datei auch wirklich Teil der mitgelieferten C++-Library?</p>
<p>Gruß<br />
Werner</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655256</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655256</guid><dc:creator><![CDATA[Werner Salomon]]></dc:creator><pubDate>Fri, 30 Jan 2009 22:15:26 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 30 Jan 2009 22:17:51 GMT]]></title><description><![CDATA[<p>Die genannte test.cpp ist Bestandteil des Qt-Projektes. Das -ITrolltech- Zeug kommt automatisch mit.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1655258</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1655258</guid><dc:creator><![CDATA[PhilippM]]></dc:creator><pubDate>Fri, 30 Jan 2009 22:17:51 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Sun, 01 Feb 2009 23:13:03 GMT]]></title><description><![CDATA[<p>Ich hab jetzt mal verschiedene Tests durchgeführt:</p>
<p>-test.h und test.cpp wie oben angegeben in ein Verzeichnis. Dann über die Kommandozeile gcc -o test.o test.cpp -&gt; Ergebnis: Kompiliert, ld mault wegen fehlender main, also alles okay.<br />
-Dann das ganze mit qt:<br />
im obigen verzeichnis qmake -project, erzeugt ein .pro mit den Headern und sourcen, dann qmake, dann make. -&gt; Ergebnis: Wie oben, kompiliert, wieder meldung über fehlende main. An Qt selbst kann's also nicht liegen.<br />
-test.h und cpp in mein Arbeitsverzeichnis kopiert, test.cpp und .h im .pro-File meines Projekts eingefügt -&gt; Ergebnis: Es knallt. &quot;copy is not a member of std::&quot; Aus der qstring.h - wo kommt die her? Ich inklude die string.h !!<br />
-Also meine Projekteinstellungen gelöscht und qmake -project ein neues .pro anlegen lassen. Qmake und make -&gt; Es knallt wieder aus der qstring.h. WTF???</p>
<p>Es gibt in meinem Qt-include verzeichnis keine string.h, nur eine qstring.h<br />
Es gibt in meinem Projektverzeichnis keine string.h</p>
<p>Probiert habe ich es mit Qt 4.3.3, dann hab ich mir Qt4.4.3 aus den Quellen kompiliert und es damit versucht - Verhalten identisch. Neues XCode hab ich installiert - aber bekomme nachwievor nur gcc 4.0.1 ist das normal?</p>
<p>Ich bin mit meinem Latein echt am ende!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1656257</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1656257</guid><dc:creator><![CDATA[PhilippM]]></dc:creator><pubDate>Sun, 01 Feb 2009 23:13:03 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Mon, 02 Feb 2009 09:27:06 GMT]]></title><description><![CDATA[<p>Wäre es nicht sinnvoll mit nem C++ Compiler zu kompilieren? gcc ist doch ein C-Compiler. Muss man da nicht g++ benutzen?</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1656371</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1656371</guid><dc:creator><![CDATA[Artchi]]></dc:creator><pubDate>Mon, 02 Feb 2009 09:27:06 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Mon, 02 Feb 2009 09:47:25 GMT]]></title><description><![CDATA[<p>Sorry, natürlich, ich meine ja g++...<br />
Das Makefile, was Qt erzeugt, benutzt natürlich auch den g++</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1656377</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1656377</guid><dc:creator><![CDATA[PhilippM]]></dc:creator><pubDate>Mon, 02 Feb 2009 09:47:25 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Mon, 02 Feb 2009 09:50:55 GMT]]></title><description><![CDATA[<p>PhilippM schrieb:</p>
<blockquote>
<p>&quot;copy is not a member of std::&quot; Aus der qstring.h - wo kommt die her? Ich inklude die string.h !!</p>
</blockquote>
<p>1. &lt;string&gt; und nicht &lt;string.h&gt; und<br />
2. &lt;algorithm&gt; fuer std::copy</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1656381</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1656381</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Mon, 02 Feb 2009 09:50:55 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Mon, 02 Feb 2009 09:51:39 GMT]]></title><description><![CDATA[<p>Vermutlich fehlen &quot;includes&quot; in deinem Source.<br />
Also z.B. &lt;algorithm&gt; und ggf. noch ein paar andere.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1656383</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1656383</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Mon, 02 Feb 2009 09:51:39 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Sun, 22 Feb 2009 13:53:49 GMT]]></title><description><![CDATA[<p>Hab den Fehler gefunden.</p>
<p>Das Problem lag in einer Datei in meinem Projekt namens assert.h in der ich eine eigenes Makro definiert habe, was fehlgeschlagene asserts in einer Datei mitloggt - unter Einsatz von QFile und QTextStream.<br />
Diese Datei ist natürlich mit<br />
#ifndef ASSERT_H<br />
#define ASSERT_H<br />
#endif</p>
<p>geguardet. Und scheinbar kollidiert diese assert.h mit einer systeminterenen assert.h - durch den guard werden andere Sachen nicht eingebaut.<br />
Nachdem ich die Datei in myassert.h umbenannt und den inklude-guard entsprechend angepasst habe, kompiliert es anstandslos.<br />
Darauf muss man erstmal kommen.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668060</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668060</guid><dc:creator><![CDATA[PhilippM]]></dc:creator><pubDate>Sun, 22 Feb 2009 13:53:49 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Sun, 22 Feb 2009 14:00:26 GMT]]></title><description><![CDATA[<p>Super!</p>
<p>Sehr schönes Beispiel dafür, dass man seine Includeguards wirklich sehr willkürlich und einmalig wählen sollte. <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /></p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668066</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668066</guid><dc:creator><![CDATA[drakon]]></dc:creator><pubDate>Sun, 22 Feb 2009 14:00:26 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Sun, 22 Feb 2009 14:37:51 GMT]]></title><description><![CDATA[<p>PhilippM schrieb:</p>
<blockquote>
<p>Darauf muss man erstmal kommen.</p>
</blockquote>
<p>Deshalb verwendet man vernuenftige include guards.<br />
ASSERT_H bettelt doch um probleme.</p>
<p>ich verwende zB<br />
&lt;projektname&gt;<em>&lt;pfad&gt;</em>&lt;dateiname&gt;_INCLUDED</p>
<p>manche leute lassen sich die include guards auch automatisch generieren, so dass man zufaellige zeichen im guard stehen hat.</p>
<p>auche in MYASSERT_H (dazu musst du die datei uebrigens nicht umbenenen) bettelt um probleme...</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1668097</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1668097</guid><dc:creator><![CDATA[Shade Of Mine]]></dc:creator><pubDate>Sun, 22 Feb 2009 14:37:51 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 19 Jun 2009 16:59:36 GMT]]></title><description><![CDATA[<p>Ich verwende neuerdings (wenn ich nicht pragma once verwenden darf/kann) <code>INCLUDED_PROJECT_FILEPATH_FILENAME_EXT</code> . Das hat den Vorteil dass alle Header-Guards in alphabetisch sortierten Listen zusammen stehen, so dass man &quot;echte&quot; Makros schneller findet, und die sich nicht zwischen den ganzen Header-Guards verlieren.</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729660</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729660</guid><dc:creator><![CDATA[hustbaer]]></dc:creator><pubDate>Fri, 19 Jun 2009 16:59:36 GMT</pubDate></item><item><title><![CDATA[Reply to std::string und andere std::-Typen auf dem Mac ? on Fri, 19 Jun 2009 17:20:59 GMT]]></title><description><![CDATA[<p>Oder auch noch eine Möglichkeit, vor allem um die ellenlange Pfade abzukürzen:<br />
<code>H_&lt;projektkürzel&gt;_&lt;dateiname&gt;_GUARD__&lt;datum &amp; zeit alles an einem Stück&gt;</code></p>
<p>Bsp:<br />
<code>H_MLL_PARKING_DLG_GUARD__20090614173821</code></p>
<p>Es ist ziemlich unwahrscheinlich, dass jemand in der genau gleichen Sekunde den gleichen Header Guard erstellt <img
      src="https://www.c-plusplus.net/forum/plugins/nodebb-plugin-emoji/emoji/emoji-one/1f642.png?v=ab1pehoraso"
      class="not-responsive emoji emoji-emoji-one emoji--slightly_smiling_face"
      title=":)"
      alt="🙂"
    /><br />
Die von hustbear angesprochene Sortierung ist hier übrigens auch vorhanden.</p>
<p>Grüssli</p>
]]></description><link>https://www.c-plusplus.net/forum/post/1729672</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/1729672</guid><dc:creator><![CDATA[Dravere]]></dc:creator><pubDate>Fri, 19 Jun 2009 17:20:59 GMT</pubDate></item></channel></rss>