Skip to content

IlyaBizyaev/os-lib

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Library linkage

Goal

This is an educational task aimed at understanding how to link with static and dynamic libraries and use dlopen(3) at runtime.

Components

libfoo — static library
libbar — dynamic library, linked
libbaz — dynamic library, loaded with dlopen
foobarbaz — executable that loads the 3 libs

Usage

$ mkdir build
$ cd build
$ cmake .. -DCMAKE_INSTALL_PREFIX=../prefix
$ make install
$ cd ../prefix/bin
$ LD_LIBRARY_PATH=. ./foobarbaz   # Prints 'FooBarBaz'
$ ldd ./foobarbaz   # Does not show libbaz.so

Copyright

Ilya Bizyaev, 2019 ([email protected])

Available in public domain.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 59.2%
  • CMake 40.8%