FW: Error from memcpy in cstring

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi, guys,

More errors occurred from the head file cstring in g++ 13.2.0. Please see below and could someone please tell me how to fix them? I check the head file cstring and did not understand why cstring head file is like that?

I look forward to your solution to the error occurred from the head file cstring.

Thanks again,

Dingjun




In file included from /home/Dingjun.Chen/DAQ_XYZCross2_cmake_v5/src/_d_dngl.cc:11:
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:77:11: error: 'memchr' has not been declared in '::'
   77 |   using ::memchr;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:78:11: error: 'memcmp' has not been declared in '::'
   78 |   using ::memcmp;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:79:11: error: 'memcpy' has not been declared in '::'
   79 |   using ::memcpy;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:80:11: error: 'memmove' has not been declared in '::'
   80 |   using ::memmove;
      |           ^~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:81:11: error: 'memset' has not been declared in '::'
   81 |   using ::memset;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:82:11: error: 'strcat' has not been declared in '::'
   82 |   using ::strcat;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:83:11: error: 'strcmp' has not been declared in '::'
   83 |   using ::strcmp;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:84:11: error: 'strcoll' has not been declared in '::'
   84 |   using ::strcoll;
      |           ^~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:85:11: error: 'strcpy' has not been declared in '::'
   85 |   using ::strcpy;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:86:11: error: 'strcspn' has not been declared in '::'
   86 |   using ::strcspn;
      |           ^~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:87:11: error: 'strerror' has not been declared in '::'
   87 |   using ::strerror;
      |           ^~~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:88:11: error: 'strlen' has not been declared in '::'
   88 |   using ::strlen;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:89:11: error: 'strncat' has not been declared in '::'
   89 |   using ::strncat;
      |           ^~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:90:11: error: 'strncmp' has not been declared in '::'
   90 |   using ::strncmp;
      |           ^~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:91:11: error: 'strncpy' has not been declared in '::'
   91 |   using ::strncpy;
      |           ^~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:92:11: error: 'strspn' has not been declared in '::'
   92 |   using ::strspn;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:93:11: error: 'strtok' has not been declared in '::'
   93 |   using ::strtok;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:94:11: error: 'strxfrm' has not been declared in '::'
   94 |   using ::strxfrm;
      |           ^~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:95:11: error: 'strchr' has not been declared in '::'
   95 |   using ::strchr;
      |           ^~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:96:11: error: 'strpbrk' has not been declared in '::'
   96 |   using ::strpbrk;
      |           ^~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:97:11: error: 'strrchr' has not been declared in '::'
   97 |   using ::strrchr;
      |           ^~~~~~~
/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0/cstring:98:11: error: 'strstr' has not been declared in '::'
   98 |   using ::strstr;
      |           ^~~~~~




From: Dingjun Chen
Sent: Thursday, November 9, 2023 6:58 AM
To: gcc-help@xxxxxxxxxxx
Subject: Error from memcpy in cstring

Hi, guys,

Please see below and how to fix this error?


PS C:\Users\Dingjun.Chen> g++ --version
g++.exe (MinGW-W64 x86_64-ucrt-posix-seh, built by Brecht Sanders) 13.2.0
Copyright (C) 2023 Free Software Foundation, Inc.


I did include the following head files in _d_dngl.cc

include/c++/13.2.0/cstring


/home/Dingjun.Chen/DAQ_XYZCross2_cmake_v5/src/_d_dngl.cc:284:9: error: 'memcpy' was not declared in this scope
  284 |         memcpy(aRandom1, aDeCrypt1, 8);
      |         ^~~~~~
/home/Dingjun.Chen/DAQ_XYZCross2_cmake_v5/src/_d_dngl.cc:284:9: note: 'memcpy' is defined in header '<cstring>'; did you forget to '#include <cstring>'?



I look forward to your help and hearing from you!


Thanks & regards,

Dingjun





[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux