2 Replies - 811 Views - Last Post: 13 January 2007 - 11:26 AM Rate Topic: -----

#1 djbilly  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 09-January 07

Compile ok but build error2019

Posted 12 January 2007 - 10:23 PM

#include<iostream>
#include<fstream>
#include<string>
using namespace std;

int main()
{

string line;
ifstream f("client.dat");
while(!f.eof())
{
	getline(f,line);
	cout<<line<<endl;
}
f.close();

}//end main


Linking...
MSVCRTD.lib(crtexew.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function ___tmainCRTStartup
C:\Documents and Settings\djbilly\My Documents\Visual Studio 2005\Projects\getline\Debug\getline.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\Documents and Settings\djbilly\My Documents\Visual Studio 2005\Projects\getline\getline\Debug\BuildLog.htm"
getline - 2 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========

Is This A Good Question/Topic? 0
  • +

Replies To: Compile ok but build error2019

#2 Mrafcho001  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 40
  • View blog
  • Posts: 769
  • Joined: 01-November 05

Re: Compile ok but build error2019

Posted 13 January 2007 - 10:55 AM

build it as a Win32 Console Application not Win32 Application
Was This Post Helpful? 0
  • +
  • -

#3 djbilly  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 23
  • Joined: 09-January 07

Re: Compile ok but build error2019

Posted 13 January 2007 - 11:26 AM

View PostMrafcho001, on 13 Jan, 2007 - 10:55 AM, said:

build it as a Win32 Console Application not Win32 Application



worked fine thank you buddy
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1