Skip to content

A cross-platform (Win 🪟, MacOS 🍎, Linux 🐧) starter project for the Image Processing labs at UTCN

License

Notifications You must be signed in to change notification settings

fuzesa/ip-labs-xplatform-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IP Labs Cross-Platform Starter

Introduction

This is a sample starter project for the Technical University of Cluj-Napoca - Faculty of Automation & Computer Science - Computer Science Department ▶️ ▶️ Image Processing English language laboratories

Platform specific setup

Windows

!!! IMPORTANT !!! This setup is meant to be used WITHOUT Visual Studio. If you want to use Visual Studio, then just simply download the starter project specific to your Visual Studio version from the labs homepage. Visual Studio can be a HUGE resource hog, so in case you don't want to use it and would rather use the much more lightweight and less resource intensive Visual Studio Code, then this is the setup for you.

MSYS2

  1. Since we are going to use VS Code as our IDE, we need to install a compiler and a build system. For this we are going to use MSYS2, which is a minimal unix-like environment for Windows that uses pacman as its package manager for easy installation of packages and other dependencies that you will need.
    From the MSYS2 homepage, download the installer and run it.

  2. Once you have installed it, run the UCRT64 based shell. To paste text into the shell, right click on the title bar and select Edit -> Paste or press Shift + Insert.

    MSYS2 UCRT64 Inside the shell, run the following commands to update the package database and upgrade the packages to the latest version. When asked, please confirm the installation of the packages by typing y and pressing Enter.

    pacman -Syu

    Confirm Updates The terminal might want to close in case of some critical updates, such as pacman, please confirm that as well and then open the shell again.

  3. Next, you will want to install the following packages:

    pacman -S base-devel mingw-w64-ucrt-x86_64-clang mingw-w64-ucrt-x86_64-lldb mingw-w64-ucrt-x86_64-ninja mingw-w64-ucrt-x86_64-cmake mingw-w64-ucrt-x86_64-opencv mingw-w64-ucrt-x86_64-qt6-5compat

    Install Packages

  4. Now that you have installed all the packages, you will need to add the MSYS2 binaries to your PATH environment variable. Go ahead and open the Edit environment variables for your account window by searching for it in the start menu.

    Edit Environment Variables

  5. Click on the Path variable and then click on Edit

    Edit Path

  6. Add the following new entries to the list:

    C:\<PATH_TO_WHERE_YOU_INSTALLED_MSYS2>\ucrt64\bin
    C:\<PATH_TO_WHERE_YOU_INSTALLED_MSYS2>\ucrt64\lib

    Add new entries

    NOTE: In my case, I installed MSYS2 in C:\Users\Public\Apps\MSYS2, yours might be different, so please make sure to use the correct path.

    Afterwards, click on OK in all of the dialogs / windows to save the changes.

  7. Now, go ahead and fire up VS Code, where you will need to install the C/C++ extension for VS Code. To do this, open VS Code and click on the Extensions icon in the left sidebar. Then search for C/C++ and click on Install.

  8. Once the extension is installed, then go ahead and open the project from GitHub in VS Code. When the project is opened, you should configure CMake by opening the command palette with Ctrl + Shift + P and then searching for CMake: Select a kit. Select the Clang 17.0.6 x86_64-w64-windows-gnu (ucrt64) kit.

    Select CMake Kit

  9. This should automatically configure CMake. In case it didn't, then open the command palette and run CMake: Configure. You should see a similar output in your editor as well:

    CMake Configure

  10. Then you should build the project by either clicking on the Build button in the bottom left corner of the editor or by opening the command palette and running CMake: Build (Ctrl + Shift + B).

  11. Run or Debug the project by clicking on the Run or Debug buttons in the bottom left corner of the editor.

    Run or Debug

Linux

MacOS

About

A cross-platform (Win 🪟, MacOS 🍎, Linux 🐧) starter project for the Image Processing labs at UTCN

Topics

Resources

License

Stars

Watchers

Forks