Homework Tutorial 10/11/12
- Due 16 Oct 2022 by 23:59
- Points 5
- Submitting a text entry box, a media recording, or a file upload
The homework in this module consists of two parts. Some theory questions and a small programming task or question. The answers to the theory questions are accessible directly from the course content if you have followed along with it so you shouldn't need any external resources. Given the amount of misleading information that is out there in the context of C++, I would recommend that you try and solve the questions based on the course content and not by searching for it.
We are not expecting perfection on these tasks, and a homework that you hand in on time is better than a perfect homework that you hand in late.
Question 1:
What is the purpose of the -I and -L flags with GCC?
Question 2:
Given a system library file called libDNA.so-3.2
-
- What kind of library is it?
- What is the name of the library?
- What flag would you pass to the compiler to tell it to link to it?
Question 3:
Describe, briefly, the differences between a static and a dynamic library
Question 4:
Roughly speaking, what is the role of the loader? What are two ways that you can change where it looks for files?
Programming task/question:
Visit https://github.com/fffaraz/awesome-cpp and find one library that is built using CMake. Write down the commands that would be needed to
- Download
- Build
- Install
that particular library in a local folder. Note which folders are the source, build, and installation directory. You don't need to know how to use the library or write any software that relies on it, it is sufficient that you can demonstrate how to build it locally with CMake and make. You may not use either of the libraries that we used as demonstrations during the tutorial.
Good luck and let me know if you have questions!
// Einar