AR# 46809

AutoESL - Compiling project results in error "Undefined Reference to 'WinMain@16' collect2: ld returned 1 exit status"

Description

Building C/C++ projects, the following error is reported by AutoESLZ:

libmingw32.a(main.o):main.c:(.text+0xd2): undefined reference to `WinMain@16' collect2: ld returned 1 exit status make: *** [a.exe] Error 1

Solution

This error is the result of a missing main() function. Adding testbench with a main() function will remove this error.
AR# 46809
Date 11/23/2016
Status Active
Type General Article
Tools