RE: FW: Error from memcpy in cstring

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

 



Hi, Ruoyao, 

Thanks indeed for your advice. After I change 'include_directories' below and then the errors occurred before are gone. 

Thanks again and have a great day, 

Best regards, 

Dingjun


include_directories(
        "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/lib/gcc/i686-linux-musl/13.2.0/include/ssp"
        "${PROJECT_SOURCE_DIR}/include"
        "/home/Dingjun.Chen/usr/include/rtd"
        "/home/Dingjun.Chen/usr/include/gsc"
     )


-----Original Message-----
From: Xi Ruoyao <xry111@xxxxxxxxxxx> 
Sent: Thursday, November 9, 2023 8:19 AM
To: Dingjun Chen <Dingjun.Chen@xxxxxxxxxxxxxxxxxxx>; LIU Hao <lh_mouse@xxxxxxx>; gcc-help@xxxxxxxxxxx
Subject: Re: FW: Error from memcpy in cstring

External Email Warning: Do not click any links or open any attachments unless you trust the sender and know the content is safe. From Geotech IT.



On Thu, 2023-11-09 at 13:14 +0000, Dingjun Chen wrote:

> include_directories(
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/include/c++/13.2.0"
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/lib/gcc/i686-linux-musl/13.2.0/include/ssp"
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/sysroot/usr/include"
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-linux-musl/sysroot/usr/include/asm"
>         "/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/lib/gcc/i686-linux-musl/13.2.0/include/ssp"

All entries above just seem wrong.

/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-
linux-musl/include/c++/13.2.0 should be a default system C++ header path.

/home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-linux-musl/i686-
linux-musl/sysroot/usr/include should be a default system header search paths if --sysroot is used correctly.

The other paths contain internal implementation details, and they should never be used with -I.

In this case /home/Dingjun.Chen/x-tools/HOST-x86_64-pc-cygwin/i686-
linux-musl/lib/gcc/i686-linux-musl/13.2.0/include/ssp contains a string.h, so using it with -I causes #include <string.h> to find a wrong string.h.

--
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University




[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