PDA

View Full Version : Unresolved external _main



dec
13th April 2009, 23:05
Hi everyone!
I'm trying to compile my code in MS VS 2008 and get "unresolved external symbol _main at WinMain@16" error.
I've read a thread here posted by a guy with same troubles.. But his problem was that he wanted to build a dll but havent't told linker about that))

What I've done:
I had just a source file.
Then qmake -project qmake -t vcapp.
Opened the vcproj file with the Studio (Saw a warning that vcproj is old one - for MS VS 6)

After adding all necessary libraries I get only one error:
qtmaind.lib(qtmain_win.obj) LNK2019: unresolved external symbol _main referenced in function _WinMain@16
I've seen an advice to switch subsystem to CONSOLE - didn't help.

What am I doing wrong?
Thank you!