skip to Main Content

i’m quite new to programming.

I’m trying to install a compiler for my Vscode. I tried to use GNAT but i couldn’t figure out how to install it, so I used mingw64.

I followed the documentation online, and i wanted to install the following packages:
pacman -S mingw-w64-gcc-ada mingw-w64-gprbuild mingw-w64-gdb

(refer to ADA & SPARK package for VScode documentation)

I tried to run this command in the MSYS2 command prompt, but everytime it says ‘error: target not found".

I followed the advices of other users on other threads on Stack Overflow, but I got the same error.
For example I tried to use the command pacman -Syu multiple times to ensure that everything was up to date; then I tried pacman -Ss mingw-w64-gcc-ada

Does anyone has an answer to my problem? Thanks you in advance.

I tried multiple times to install packages for mingw but got always the same error: error : target not found: [name of the package]

2

Answers


  1. If you are new to the Ada ecosystem I recommend downloading a version of the GNAT compiler from https://www.adacore.com/download

    Officially the recommended way nowadays is to use the Alire package manager. It’s also a user friendly way to get started if you are used to package managers.

    Login or Signup to reply.
  2. The instruction you were following are wrong. Try replacing mingw-w64 with $MINGW_PACKAGE_PREFIX in the commands you quoted to install the correct package for whatever MINGW environment you are running.

    If you’re not running one of MSYS2’s MINGW environments, then that variable won’t be defined, and you should run probably run the "MSYS2 MinGW 64-bit" shortcut to start the MINGW64 environment.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search