Question: what is undefined reference to winmain 16?
Answer: You forgot to define the main function. It means you're building your program as a 16-bit windows executable. WinMain() is the traditional start point for windows programs (rather than main() which is standard C) and WinMain@16 is that name as adorned when compiling and linking to produce a 16 bit windows program.