Linker error

Started by
0 comments, last by Tempest 22 years, 2 months ago
Guys, I''m having a hard time figuring out a linker error. I started out just trying to write a program to display some text on a screen, and when I couldn''t figure that out, I tried a simple Hello World, and still didn''t work. Now I''m down to trying to get this to work: #include <iostream> int main() { return 0; } I keep getting this error: --------------------Configuration: ProgramThatWontWork - Win32 Debug-------------------- Linking... LIBCD.lib(wincrt0.obj) : error LNK2001: unresolved external symbol _WinMain@16 Debug/ProgramThatWontWork.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. ProgramThatWontWork.exe - 2 error(s), 0 warning(s) I''ve even tried to get the #include <iostream> to link by itself. I also tried it with the .h, among other things. It''s got to be something stupid I''m missing. Why shouldn''t this work? I created a new Win32 application, surely I don''t have to add anything to it to get it work, right? I figure the libraries should already be included for a program this simple. I''m using MSVC 6 Thanks
Advertisement
Try creating a new Win32 console application. WinMain is the entry point for normal Win32 apps, and that''s what the linker is looking for. Console apps have an entry point of main(), which is exactly what you want.
ReactOS - an Open-source operating system compatible with Windows NT apps and drivers

This topic is closed to new replies.

Advertisement