This is my first post on this forum so kindly overlook any mistake that I make.
I was working on a very simple problem: taking a string value from the user and printing its lowercase form.
Here's my code:
#include <stdio.h>
#include <string.h>
main()
{
char s[100];
printf("Enter a Sttring: ");
gets(s);
strlwr(s);
printf("%s",s);
}
I am working on ubuntu 14.04. I used the text editor Sublime text 2.
I tried to compile the program in the terminal with the code: make eg
It returned:
eg.c.text+0x3f): undefined reference to `strlwr'
collect2: error: ld returned 1 exit status
make: *** [eg] Error 1
I even tried with gcc and clang but ended up getting the same error.
Thanks in advance.
Bookmarks