User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,580 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,616 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums

MS Visual++ 6.0 - Error C2146, C2501 ...

Join Date: Apr 2004
Posts: 3,755
Reputation: Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light Dave Sinkula is a glorious beacon of light 
Rep Power: 17
Solved Threads: 147
Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: MS Visual++ 6.0 - Error C2146, C2501 ...

  #7  
May 27th, 2004
Originally Posted by Ashok_beginner
Thanks..the compiler error's gone, however there is a linker error that says:

error LNK2001: unresolved external symbol _main
fatal error LNK1120: 1 unresolved externals
You have set up your build tool to create a console application, but you have code for a Windows GUI application. Try creating a new project and select "Win32 Application" instead of "Win32 Console Application". Then try rebuiliding your code. Or else try changing your code to this.
#include<windows.h>

int main(void)
{
   MessageBox(0,"Hi","Title",0);
   return(0);
}
Reply With Quote  
All times are GMT -4. The time now is 6:24 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC