I can't get the GetString()
function from the cs50 library to work. I have tried update50
and have rebooted several times and it is still throwing out this error:
jharvard@appliance (~/Dropbox): make hello-2
g++ hello-2.C -lcs50 -lm -o hello-2
/tmp/cckhwx2U.o: In function `main':
hello-2.C:(.text+0x16): undefined reference to `GetString()'
collect2: error: ld returned 1 exit status
make: *** [hello-2] Error 1
[Included code from comment]
#include <cs50.h>
#include <stdio.h>
int main(void)
{
printf("Your name please: ");
string name = GetString();
printf("hello, %s\n", name);
}
appliance50 -v
in a terminal window to find the appliance version.