Skip to the task
Layout
Back to classic view

You are looking at lesson 1. Your place is still lesson 2, task 1: Types.

CHECKTask 17 of 21 · step 7: Drills: check yourself

A linker error

The code compiled, but the build ends like this. What do you fix?

undefined reference to `WinMain'
collect2.exe: error: ld returned 1 exit status
Stuck?

The program has no function main: most likely it says Main or mian. The error comes from the linker (ld), not the compiler, so it has no line number.