title: ‘memcpy’ was not declared in this scope
body: <p>I'm trying to build an open source c++ library with gcc and eclipse.
  But I get this error
  ‘memcpy’ was not declared in this scope</p>
  
  <p>I've try to include memory.h (and string.h) and eclipse find the function if I click "open declaration" but gcc give me the error.</p>
  
  <p>How can I do?</p>
  
  <pre><code>#include &lt;algorithm&gt;
  #include &lt;memory.h&gt;
  
  namespace rosic
  {
     //etc etc
  template &lt;class T&gt;
    void circularShift(T *buffer, int length, int numPositions)
    {
      int na = abs(numPositions);
      while( na &gt; length )
        na -=length;
      T *tmp = new T[na];
      if( numPositions &lt; 0 )
      {
  
        memcpy(  tmp,                buffer,              na*sizeof(T));
        memmove( buffer,            &amp;buffer[na], (length-na)*sizeof(T));
        memcpy( &amp;buffer[length-na],  tmp,                 na*sizeof(T));
      }
      else if( numPositions &gt; 0 )
      {
        memcpy(  tmp,        &amp;buffer[length-na],          na*sizeof(T));
        memmove(&amp;buffer[na],  buffer,            (length-na)*sizeof(T));
        memcpy(  buffer,      tmp,                        na*sizeof(T));
      }
      delete[] tmp;
    }
  
  //etc etc
  }
  </code></pre>
  
  <p>I get error on each memcpy and memmove function.</p>