Tag Archives: Typical errors in C language

Solution to error [error] LD returned 1 exit status in C language

This error is sometimes reported when writing C/C + + experiments:

[Error] ld returned 1 exit status

This error is sometimes reported, that is, when running, it will jump to the warning place to report an error, but the warning will not report an error originally.

There are several reasons:

1. Other functions are defined in the main function

2. When there are many codes, the function name of a library function is wrong, such as scanf, printf and main

3. A custom function has only a function name and no function body, but is called

4. The function name of the custom function is inconsistent with the parameters in the function body below, resulting in the non existence of the called function

5. The last running program has not been closed