This is a C++ library built to handle mathematical operations and functions for complex numbers. It was created as a project for an Advanced Computer Programming course.
- Compile each individual C++ file in the terminal using
gcc -c src/*.cpp
in the main directory- The
-c
switch tells GCC to compile and assemble but not link the files - The
*.cpp
will compile every C++ file in the src folder - This will create object files outside of the src folder
- The
- The static library can then be created using
ar rsv ComplexLibrary.a *.o
- The
r
switch replaces any previous libraries with that name - The
s
switch creates an archive - The
v
switch uses verbose to provide additional output - The
*.o
will add every compiled C++ file in the directory
- The
- The library contents can be verified with
ar -t ComplexLibrary.a
To run the ComplexRunner.cpp file, use the command g++ ComplexRunner.cpp -o ComplexRunner.exe ComplexLibrary.a
in the main directory. This will create ComplexRunner.exe
that is linked to the static library. To run the file, type ComplexRunner
into the terminal.