That program of yours isn't a windows program - it's a console program. Compile it as a DOS executable, and it should work. Your project settings must be FUBAR since the linker is trying to bring in the windows stuff.