C ++ error when I compile an I / O file to open the file
hi someone can help me compile this program, when I build all of the program, ERROR 1 is shown in the console and it fails. the simple program:
//#include
- include
- include
- include
- include
- include “stdlib.h”
- include “math.h”
- include “stdio.h”
- define PI 3.14159265
using namespace std;
int main (void)
{
ifstream fd(“C:/Buffer/prova.txt”);
if( !fd ) {
printf(“Error\n”);
exit(1);
}
fd.close();
for(;;);
}
This is the console report:
Building target: Prova_io.elf
Invoking: MCU G++ Linker
arm-none-eabi-g++ -mcpu=cortex-m4 -mthumb -mfloat-abi=hard -mfpu=fpv4-sp-d16 -T”C:\Disco_D\FFT_AC6\Prova_file\Prova_io\LinkerScript.ld” -Wl,-Map=output.map -Wl,--gc-sections -fno-exceptions -fno-rtti -o “Prova_io.elf” @”objects.list”
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: Prova_io.elf section `.rodata’ will not fit in region `FLASH’
c:/ac6/systemworkbench/plugins/fr.ac6.mcu.externaltools.arm-none.win32_1.15.0.201708311556/tools/compiler/bin/../lib/gcc/arm-none-eabi/6.3.1/../../../../arm-none-eabi/bin/ld.exe: region `FLASH’ overflowed by 27680 bytes
collect2.exe: error: ld returned 1 exit status
makefile:51: recipe for target ‘Prova_io.elf’ failed