My code is like a text compressor, reads plain text and turns into numbers, each word has a number. It compiles in DevC ++, but does not end, however it does not compile in Ubuntu 13.10. I get an error like in the title in Ubuntu "undefined reference to` strlwr ", my code is a little long, so I can not post it here, but one of the errors is here:
//operatinal funcitons here int main() { int i = 0, select; char filename[50], textword[40], find[20], insert[20], delete[20]; FILE *fp, *fp2, *fp3; printf("Enter the file name: "); fflush(stdout); scanf("%s", filename); fp = fopen(filename, "r"); fp2 = fopen("yazi.txt", "w+"); while (fp == NULL) { printf("Wrong file name, please enter file name again: "); fflush(stdout); scanf("%s", filename); fp = fopen(filename, "r"); } while (!feof(fp)) { while(fscanf(fp, "%s", textword) == 1) { strlwr(textword); while (!ispunct(textword[i])) i++; if (ispunct(textword[i])) { i = 0; while (textword[i] != '\0') i++; i--; while (ispunct(textword[i])) i--; i++; i=0; while (isalpha(textword[i])) i++; textword[i] = '\0'; } addNode(textword); } } .... //main continues
c string linker-errors
mrtgnccn
source share