collect2.exe: error: ld returned 1 exit status(python,sublime,g++)

created at 11-03-2021 views: 13

Problem Description

I used sublime to run python programs before, and later configured the MinGW environment to compile C++ programs, and then after running the Python program, the following error occurred:

F:/MinGW/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.1.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe:D:\codepractice\ fourier.py: file format not recognized; treating as linker script
F:/MinGW/mingw64/bin/…/lib/gcc/x86_64-w64-mingw32/8.1.0/…/…/…/…/x86_64-w64-mingw32/bin/ld.exe:D:\codepractice\ fourier.py:2: syntax error
collect2.exe: error: ld returned 1 exit status

solution

Tools->Build System->python
Then it's fine

created at:11-03-2021
edited at: 11-03-2021: