- Added `-c` to ONLY compile but do NOT attempt to link and make an executable. If we try this it looks for a `main` symbol to satisfy the `_start` for linux-ld
- Updated the build instructions for being able to statically link against the library
This commit is contained in:
Tristan B. Velloza Kildaire 2024-02-25 19:17:15 +02:00
parent 9c72115dc1
commit 513fb920ce
2 changed files with 3 additions and 3 deletions

View File

@ -1,9 +1,9 @@
library:
gcc library.c -shared -o library.o
gcc -c library.c -o library.o
clean:
rm library.o
rm main
main:
gcc main.c library.o -o main
gcc main.c library.o -o main

View File

@ -1,4 +1,4 @@
int myFunc(int x)
{
return x*2;
return x*4;
}