Error compiling Ada program: "can not find -lpthread"

1

I am using Emacs to program in using the GNAT compiler .

And it throws me the following error when trying to compile:

-*- mode: compilation; default-directory: "c:/Users/Sergio/Favorites/Desktop/Universidad/Ada/" -*-
Compilation started at Sat Sep 03 01:21:40

gnatmake -d hola.adb
completed 1 out of 2 (50%)...
completed 2 out of 2 (100%)...
gnatbind -x hola.ali
gnatlink hola.ali
c:/mingw/bin/../lib/gcc/mingw32/5.3.0/../../../../mingw32/bin/ld.exe: cannot find -lpthread
collect2.exe: error: ld returned 1 exit status
gnatlink: error when calling C:\MinGW\bin\gcc.exe
gnatmake: *** link failed.

Compilation exited abnormally with code 4 at Sat Sep 03 01:21:43

The code I try to compile is a simple hello world:

with Text_IO;

procedure Hola is
begin
    Text_Io.Put_Line("hola");
end Hola;

and the command I use is gnatmake hola.abd

How can I solve it?

    
asked by pepe 03.09.2016 в 06:29
source

1 answer

0

The program is poorly written. I put it well:

with Ada.Text_IO;

procedure Hola is
begin
    Ada.Text_Io.Put_Line("hola");
end Hola;
    
answered by 20.09.2016 в 18:57