Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <cs50.h>
- int main(void)
- {
- printf("State our name: ");
- string s = GetString();
- printf("hello, %sn", s);
- }
- /tmp/ccHZXs2m.o: In function `main'
- hell.c:(.text+0x16): undefined reference to `GetString'
- collect2: error: ld returned 1 exit status
- make: *** [hell] Error 1
- int main(void) {
- string name;
- printf("Введите ваше имя");
- scanf("%s", name);
- printf("Привет, %sn!", name);
- return 0;
- }
- cc -c help.c -o help.o
- cc -c cs50.c -o cs50.c
- cc -o help help.o cs50.o
- string GetString(void)
- {
- return "test";
- }
- CC=clang
- CFLAGS=-ggdb3 -O0 -std=c99 -Wall -Werror
- LDLIBS=-lcs50 -lm
- make hell
- gcc -o ./hello[.exe] hello.c cs50/lib/src/cs50.c
- get_string()
Add Comment
Please, Sign In to add comment