I am looking for a compiler that supports the instructions clrscr
, I have read that it seems that the error is in the library conio.h
.
I have tried mingw
but it gives me the following error:
C:\tesisv3>gcc sumar2.c C:\Users\Yept\AppData\Local\Temp\ccb5dlGC.o:sumar2.c:(.text+0xe): undefined reference to `clrscr' collect2.exe: error: ld returned 1 exit status
The program I want to compile is this:
#include <stdio.h>
#include <conio.h>
void main()
{
int a,b,suma;
clrscr();
printf("Dame el primer numero \n");
scanf("%d",&a);
printf("Dame el segundo numero \n");
scanf("%d",&b);
suma=a+b;
printf("El resultado de la suma es: %d \n",suma);
getch();
}
I have run the program in an IDE that I have called Turbo C++ but I have not been able to use its compiler from the CMD to compile because it gives me an error which says that it cannot be executed on 64-bit systems
This function is exclusive to the Turbo C++ compiler (the same one you mentioned in your question), so if you really need it you will have to resort to this compiler. As this function is not part of the standard, no one guarantees that the code will compile with a different compiler or, much less, with another operating system.
Turbo C++ is a deprecated compiler, meaning it no longer receives any maintenance or updates. As if this were not enough, a few years ago there was a general change in PCs, which went from 32 to 64 bits...
I'm afraid that for it to work you will have to mount a virtual machine or play with the compatibility mode of Windows