- Create 2 files:
main.c that will contain main() func.
libhello.c that will contain hello() func. This func prints Hello, world! to terminal screen.
- Compile
libhello.c as libhello.so;
- call
hello() from main();
- Compile
main.c as main and link it with libhello.so;
- Run
main and observe output.