Skip to content

Instantly share code, notes, and snippets.

@G36maid
Created June 19, 2023 20:08
Show Gist options
  • Select an option

  • Save G36maid/0c30a73e6062bd1b447907d58105ee2c to your computer and use it in GitHub Desktop.

Select an option

Save G36maid/0c30a73e6062bd1b447907d58105ee2c to your computer and use it in GitHub Desktop.
miku@DESKTOP-HLSSCVT:~$ cd Final
miku@DESKTOP-HLSSCVT:~/Final$ cd P3
miku@DESKTOP-HLSSCVT:~/Final/P3$ ls
a.out fin03.c linuxlist.h makefile schedule.c schedule.h
miku@DESKTOP-HLSSCVT:~/Final/P3$ make
gcc fin03.c schedule.c -lm -o fin03
In file included from schedule.h:4,
from schedule.c:5:
linuxlist.h:99: warning: "offsetof" redefined
99 | #define offsetof(TYPE, MEMBER) ((size_t)&((TYPE *)0)->MEMBER)
|
In file included from schedule.c:2:
/usr/lib/gcc/x86_64-linux-gnu/9/include/stddef.h:406: note: this is the location of the previous definition
406 | #define offsetof(TYPE, MEMBER) __builtin_offsetof (TYPE, MEMBER)
|
/usr/bin/ld: /tmp/ccYS8x4M.o: in function `main':
schedule.c:(.text+0x3d6): multiple definition of `main'; /tmp/ccjABz2N.o:fin03.c:(.text+0x6d7): first defined here
collect2: error: ld returned 1 exit status
make: *** [makefile:2: all] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment