GraphViewerCpp is a tool for graph visualization using the SFML library, in the context of the Algorithm Design and Analysis course, at FEUP. It has been primarily developed by Diogo Rodrigues, and is to be maintained by the course's Teaching Assistant students.
Using Read the Docs, this project's documentation is deployed here.
- Apply for a JetBrains Educational Pack using your upXXXXXXXXX@fe.up.pt email address, so that JetBrains identifies you as a real student.
- Install CLion, and activate it using your JetBrains account. Please insert the credentials you obtained in the previous step ("Get Licence From:" => "JB account")
- If you are using Windows, you might need to setup an environment. You can find documentation on how to do it here: https://www.jetbrains.com/help/clion/quick-tutorial-on-configuring-clion-on-windows.html
- For more details or other issues, please use https://www.jetbrains.com/help/clion/clion-quick-start-guide.html
You will have to install the SFML library.
Under Linux you are strongly advised to use your package manager if SFML is available; under Debian/Ubuntu you can use sudo apt-get install libsfml-dev
.
Under Windows you will have to setup SFML.
In all likelihood you have cl
(the Microsoft Windows C/C++ compiler) by default, but I advise you to use a MinGW-w64 compiler (you can use MinGW-w64 v7.3.0 64bit with SEH exceptions).
The easiest way is to download one of the binaries that matches your compiler (if you followed the above suggestion, these are the corresponding SFML binaries).
- Download the binaries to the Download folder
- Create directory
C:\sfml
- Extract the archive to
C:\sfml
so that the pathC:\sfml\SFML-2.5.1-windows-gcc-7.3.0-mingw-64-bit\SFML-2.5.1
exists - Create environment variable
SFML_PATH
, with valueC:\sfml\SFML-2.5.1-windows-gcc-7.3.0-mingw-64-bit\SFML-2.5.1
- Add to system environment variable
PATH
the path%SFML_PATH%\bin
so Windows can find the DLLs. - In your CMake files, don't forget to add
if (WIN32)
include_directories("$ENV{SFML_PATH}/include")
link_directories("$ENV{SFML_PATH}/lib")
endif()
so the compiler can find the SFML headers and libraries (see the example for some more insight).
- Go to the
example
folder - Run the following to create a makefile and use it to compile the project:
mkdir build
cd build
cmake ..
cmake --build .
- Run the project by calling the binary file that was created in
example/example
- Clone/download this repository
- Open CLion > Open > Choose the example dir in the repository
- Run the project. You will the following three different graphs being loaded, in different windows