I have to copy the string using
strcpy_s in my assignment.
The error undefine reference to 'strcpy_s' appears and cannot be executed.
strcpy is available without any problems.
I've been searching for error codes for about an hour, but I haven't been able to solve them due to my lack of ability.
I would appreciate it if you could give me an explanation.
Here's the code:c++ linux ubuntu
strcpy_s() is a new function originally adopted by
Microsoft Visual C/C++.Therefore,
strcpy_s() is not often implemented for processing systems other than
c11 I mean, C language specification ISO/IEC9899:2011 was adopted optionally, but
strcpy_s() cannot be used in libc provided by the gcc development group.That is, the ubuntu libc cannot use
strcpy_s() (If it's a challenge, there should be a designation of the development environment. Visual Studio should be able to pass honestly, but isn't it specified?
strcpy_s() is not in Ubuntu's libc, but if you want to use it on Ubuntu,
You have a choice.You can use
safelib as already mentioned, or copy
MSVC.cpp (which you haven't found yet).
strcpy_s() specification is everywhere, so if you can make the most of it.
Eclipse works on Windows, so the operating platform is Windows 10 integrated development environment is Eclipse compiler and library is MSVC.
Well, if it's a task, it's over if you finish it on Visual Studio, so I don't have to spend that much time (=cost), do I?
If you really want to implement strcpy_s on the eclipse, is there any way to force the code through and add functions?
774RR has also responded, but
strcpy_s is optional in the C language specification, and currently only available on Microsoft Visual Studio.
As a third party other than the questioner, I don't know what kind of description is actually saying, "You must copy the string using
strcpy_s in the assignment", but I suggest you read the assignment in depth again (
Also, since the
_s function in the C language specification and the
_s function in Visual Studio have subtle differences in specifications, it is better to clarify which one is required to use.
In addition, Visual Studio offers Secured Template Overload as a feature that is intended for C++ instead of C.
is compiled as
strcpy_s(A,sizeofA,B); so that you can provide a little more security with source code compatibility with environments that do not have
© 2022 OneMinuteCode. All rights reserved.