N
Neil Dunn
Hi,
I don't seem to be able to get asprintf to work when compiling under
OS X.
Using the following code:
#include <string.h>
#include <stdio.h>
int main() {
char **w;
asprintf(w,"fooo");
printf("%s\n",*w);
return 0;
}
and compiling using gcc with the -lc and -Wall flags, I get no erros.
The program runs spitting out a Bus Error. The same code on a Linux
machine gcc 3.2.2 compiles and runs as expected.
Any help would be great.
Neil
I don't seem to be able to get asprintf to work when compiling under
OS X.
Using the following code:
#include <string.h>
#include <stdio.h>
int main() {
char **w;
asprintf(w,"fooo");
printf("%s\n",*w);
return 0;
}
and compiling using gcc with the -lc and -Wall flags, I get no erros.
The program runs spitting out a Bus Error. The same code on a Linux
machine gcc 3.2.2 compiles and runs as expected.
Any help would be great.
Neil