Clion String Duplicate Bytes Library Function Not Recognised

Does anyone know why the strndup() function is unavailable to me?

I am running Clion on my Windows machine through MinGW. I've included the "string.h" header in my program but when I type the function out it prints the error message "can't resolve variable 'strndup' ". However Clion recognises the regular strdup() function with no problems.

I'm not sure why this is happening so would appreciate some help, thanks.

 

0
1 comment

Does your project successfully compile?

0

Please sign in to leave a comment.