This program crashes at the point i=(strlen(data)); with the message
No source available for “strlen() “
But Why?
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
int main (void) {
char data[]="Hallo";
char buffer[100];
if (strlen(data)!=0)
{
size_t i=0;
i=(strlen(data));
snprintf(buffer,i,"Data: %s \n",data);
return strlen(data)+1;
}
return -1;
}
The error message you cite does not sound like a crash. More like a debugger trying to step into a system library function.