This was a university project where I made a map of the university campus with the ability to find a route from one location to another.
Install GCC/G++ with
sudo apt install gcc g++
Install brew with
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Install GCC/G++ with
brew install gcc
Download and install MSYS2 from the MSYS2 website
Install MinGW with
pacman -S mingw-w64-x86_64-toolchain
or just these packages
pacman -S mingw-w64-x86_64-gcc
pacman -S mingw-w64-x86_64-make
Add the binaries folder to the environment variables
Install Make with
sudo apt install make
Install Make with
brew install make
It should have already been installed with GCC/G++ in the 'Install GCC/G++' section
Install OpenCV with
sudo apt install libopencv-dev
Install pkg-config with
sudo apt install pkg-config
Install OpenCV with
brew install opencv
Install pkg-config with
brew install pkg-config
Download, install, and build OpenCV 3.4.13 from the OpenCV website
Copy and paste the following files from
C:\opencv-3.4.13\build\bin
to the project folder:
- libopencv_core3413.dll
- libopencv_highgui3413.dll
- libopencv_imgcodecs3413.dll
- libopencv_imgproc3413.dll
The Qt version may vary
pacman -S mingw-w64-x86_64-opencv
pacman -S mingw-w64-x86_64-qt6-base
Edit the appropriate makefile for your system
- remove the file extension
- add the appropriate paths for 'CC=' and 'CXX=' for your system if it is not already the case
- set 'OPENCV=1' for compiling with OpenCV or 'OPENCV=0' to not compile with OpenCV
To run compile and run Prim's algorithm, run this command:
make prim
To run compile and run Kruskal's algorithm, run this command:
make kruskal
To run compile and run Dijkstra's algorithm, run this command:
make dijkstra
To find a route between different buildings for Dijkstra's algorithm, edit the 'main.cpp' file and change the parameters of the line
searchOnCampus("SAEF", "GRAD");
to the names of your desired buildings.