Project 4
Due May 24, 2019 at 11:59 PM
This project specification is subject to change at any time for clarification. For this project you
will be working with a partner. You will be developing C++ wrappers for two C libraries. The
wrappers will allow for reading and writing of both CSV and XML files. You have been
provided headers for the CSV and XML wrapper types. You must keep the public interface but
may develop the private implementation however you wish. The two libraries that you will be
wrapping are libcsv (for CSV) and libexpat (for XML). Fortunately, libexpat is installed on the
CSIF, but libcsv is not. The source code for libcsv has been provided for you and you will need
to build it in order to include it in your project. After you have created your wrapper classes, you
will be developing a program that will convert files between CSV and XML. The files that your
program will need to convert are course grade files described later in this project. Make sure to
add the temporary files created for your projects (*.o, *.lo, *.la, etc.) to your
.gitignore file.
Create a Makefile to configure, make, and install libcsv. Open source libraries for Linux
typically follow the same pattern for being built. The typical workflow is to configure, make, and
then install (you will be “installing” into your project directory). Configuration is done by
changing into the library source directory and executing the command:
./configure –prefix=INSTALLPATH
The INSTALLPATH is the prefix of where you would like to install the headers and the libraries.
On a typical system this is in either /usr, /usr/local, /opt, or /opt/local; however,
you will be just “installing” into your local project which should be the directory containing
libcsv-3.0.3 directory. You can get the absolute path of the Makefile with the command
$(shell pwd). There should be a lot of output where the configuration is figured out. The
building of the project should be done next with executing the command:
This should also output a lot of lines but should complete successfully. Next the library should
be installed by executing the command:
make install
This should install the libraries into the lib directory in the INSTALLPATH, and move the
header file into the include directory of the INSTALLPATH. After you build the library
correctly there should be a libcsv.a file (this is the static library you will link against) in your
lib directory, and a csv.h in in your include directory.