In what library is strcat_s?

5.6k views Asked by At

I tried including string.h and stdlib.h, but still get undefined reference compile errors.

This leads me to conclude that it is in a different library that I didn't include. Where is it?

I am using gcc compiler - the code is written in Windows, but is going to be compiled and run on a unix server.

4

There are 4 answers

0
4566976 On BEST ANSWER

There's an implementation in slibc.

0
Bill Lynch On

strcat_s can be found in string.h as of C 2011. Generally speaking, only microsoft has implemented these alternative functions.

5
Rahul Tripathi On

It is present in string.h on windows platform

You can also refer this cppreference

Defined in header <string.h>

You can better use strcat if you are working on UNIX platform.

0
Abhinav On