Skip to main content
added 24 characters in body; edited tags
Source Link
kzidane
  • 17.7k
  • 3
  • 28
  • 100

I'm having the following error "myName.c:(.text+0x18): undefined reference to `GetString'" It seams

myName.c:(.text+0x18): undefined reference to `GetString'

It seems that something is wrong with the cs50.h library. What is this file suppose to contain? In my case it doesn't contain any usable code. Example of the cs50.hcs50.h content: "char GetChar(void);"

char GetChar(void);

I'm using VM Player with the appliance50-19. Nothing was modified. Clean install.

My code:

#include <cs50.h>
#include <stdio.h>

int main(void)
{
    printf("Name:\n");
    string myName = GetString();
    printf("My name, %s\n", myName);
}

I'm having following error "myName.c:(.text+0x18): undefined reference to `GetString'" It seams that something wrong with the cs50.h library. What this file suppose to contain? In my case it doesn't contain any usable code. Example of the cs50.h content: "char GetChar(void);"

I'm using VM Player with the appliance50-19. Nothing was modified. Clean install.

My code:

#include <cs50.h>
#include <stdio.h>

int main(void)
{
    printf("Name:\n");
    string myName = GetString();
    printf("My name, %s\n", myName);
}

I'm having the following error

myName.c:(.text+0x18): undefined reference to `GetString'

It seems that something is wrong with the cs50 library. What is this file suppose to contain? In my case it doesn't contain any usable code. Example of the cs50.h content

char GetChar(void);

I'm using VM Player with the appliance50-19. Nothing was modified. Clean install.

My code:

#include <cs50.h>
#include <stdio.h>

int main(void)
{
    printf("Name:\n");
    string myName = GetString();
    printf("My name, %s\n", myName);
}
Source Link

Undefined reference to `GetString'

I'm having following error "myName.c:(.text+0x18): undefined reference to `GetString'" It seams that something wrong with the cs50.h library. What this file suppose to contain? In my case it doesn't contain any usable code. Example of the cs50.h content: "char GetChar(void);"

I'm using VM Player with the appliance50-19. Nothing was modified. Clean install.

My code:

#include <cs50.h>
#include <stdio.h>

int main(void)
{
    printf("Name:\n");
    string myName = GetString();
    printf("My name, %s\n", myName);
}