Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write 'Hello, world!' as shared object library #1

Open
midenok opened this issue Dec 9, 2013 · 0 comments
Open

Write 'Hello, world!' as shared object library #1

midenok opened this issue Dec 9, 2013 · 0 comments

Comments

@midenok
Copy link
Member

midenok commented Dec 9, 2013

  1. 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.

  1. Compile libhello.c as libhello.so;
  2. call hello() from main();
  3. Compile main.c as main and link it with libhello.so;
  4. Run main and observe output.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant