Skip to the task
Layout
Back to classic view

You are looking ahead. Your place is still task 1: Algorithm.

CHECKTask 17 of 21 · step 7: Drills: check yourselfA linker error
A linker error in practice/01/

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

Details & hint
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.

practice 01 CMakeLists.txt Code Diff
UNCHANGED This step does not change this file.
add_executable(p01_hello main.c)