If you're using malloc and get an error like this,
Process.cpp:45:53: error: invalid conversion from void* to char* [-fpermissive]it's because you need to cast the return value in C++ but not C. See this SO Q&A
char *linkCopy = malloc(strlen(&line[count]) + 1);
Linker complains that a function doesn't exist when it does. First verify with nm that the function does indeed exist. You can use it on .o object and .a archive (static library) files. If it does, the your problem is you're trying to include a header for a C file in a C++ file. There's some problems with not enough information being generated from the C file compared to what the C++ file needs. See this SO Q&A for a solution
No comments:
Post a Comment