I have a C ++ 11 project, and I have added some method calls strcpy_s. This works with windows, but when compiling on gcc, an error occurs that the character was strcpy_snot found.
strcpy_s
I added a line
#define __STDC_WANT_LIB_EXT1__ 1
to the code, to no avail.
GCC (or rather glibc) does not support strcpy_s()friends either . For some ideas on where you can find a library that supports them, see here: Are there any free implementations of strcpy_s and / or TR24731-1?
strcpy_s()
strcpy_s ++. , ++ 17 , . , glibc .
, cppreference, __STDC_WANT_LIB_EXT1__ , __STDC_LIB_EXT1__. Arch Linux .
__STDC_WANT_LIB_EXT1__
__STDC_LIB_EXT1__
#ifdef __STDC_LIB_EXT1__ constexpr bool can_have_strcpy_s = true; #else constexpr bool can_have_strcpy_s = false; #endif
strncpy. .
strncpy
Source: https://habr.com/ru/post/1657780/More articles:https://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1657775/how-do-i-pass-mulitple-columns-to-a-function-within-dplyrsummarize&usg=ALkJrhi5stoWdLp0LVsk3bA8Ubsg4WRawwReusing Jenkins pipeline stages at multiple workstations - jenkinsfolding user areas in an IntelliJ idea (typeScript) - intellij-ideaNexus 2 OSS vs Nexus 3 - nexusDownloading Systemjs for an angular2 project shows an "Access-Control-Allow-Origin" error when my static content is in another domain - angularWhy does mingw-w64 support strcpy_s () while tdm-gcc refuses to compile this call? - c ++jQuery Datatables Sum / Total for multiple groups - javascriptHow to use dash format (not webm_dash_manifest!) In ffmpeg? - ffmpegRow level security in JAX-RS using MS SQL - javaMoving Oracle table to index - oracleAll Articles