ThreadBoard ArchivesSite FeaturesActiveworlds SupportHistoric Archives |
wWinMain@16 error with Visual C++ 6.0 (Sdk)
wWinMain@16 error with Visual C++ 6.0 // Sdklucio pascarelliNov 1, 1998, 6:34pm
I get the following error with Visual C++ .. I have disabled MFC and placed
the /Tc option to generate plain C, but I cannot find a solution to the following. Sorry, but I am trying to get into C. Lucio --------------------Configuration: ActiveBot - Win32 Debug-------------------- Linking... LIBCD.lib(wwincrt0.obj) : error LNK2001: unresolved external symbol _wWinMain at 16 Debug/ActiveBot.exe : fatal error LNK1120: 1 unresolved externals Error executing link.exe. ActiveBot.exe - 2 error(s), 0 warning(s) jwNov 1, 1998, 7:10pm
did you create an app or a console program? you cant use an app because it
doesnt create a window, which causes your error. you need to make a console program. [View Quote] > I get the following error with Visual C++ .. I have disabled MFC and placed > the /Tc option to generate plain C, but I cannot find a solution to the > following. Sorry, but I am trying to get into C. > > Lucio > > --------------------Configuration: ActiveBot - Win32 > Debug-------------------- > Linking... > LIBCD.lib(wwincrt0.obj) : error LNK2001: unresolved external symbol > _wWinMain at 16 > Debug/ActiveBot.exe : fatal error LNK1120: 1 unresolved externals > Error executing link.exe. > > ActiveBot.exe - 2 error(s), 0 warning(s) roland vilettNov 1, 1998, 7:11pm
I am not familiar with the details of 6.0 but this error implies that your
application project is set up to be a Windows application, so the linker is looking for your WinMain() and not finding it. Much as all normal C programs must have a main() function, all Windows applications must have a WinMain() function. However, you can get around this requirement by creating a "console application" project, which functions as a normal C program, requiring a main() instead of a WinMain(). When you use the New Project wizard under Visual C++, you have a choice of a variety of different project types to create. I'm not sure but your error suggests that you probably picked "Win32 application" (that's how it appears under 5.0). Instead you should create a project of type "Win32 Console Application" if you don't want to mess around with creating a WinMain() function. Of course, console applications will limit you to "DOS box" stdin/stdout functionality only. If you want to create a full fledged Windows app with windows and menus etc. then you will have to bite the bullet and learn how to write a WinMain() function, among other things. I don't know how these various project types correspond to linker options at the low level. My advice would be to start over by creating a new Console Application project from scratch and moving over your source files. -Roland [View Quote] |