I am trying to compile code that will perform an http POST using the GNU c++ compiler, and I get the following error:

http_post2.cpp:93: error: ‘strlen’ was not declared in this scope

The line that it points to is simply:


I went up to see where SEND_RQ is defined and this is it:

#define SEND_RQ(MSG) \

                /*cout<<send_str;*/ \

I have my includes above this, however and when I've added

#include <stdio.h>


#include <stdlib.h>

, it hasn't helped.

strlen is declared in <string.h>, or <cstring> if you want your stuff in the std namespace.

Thanks Narue!

It's perfect now.