Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VC++ Time functions

Status
Not open for further replies.

SmileeTiger

Programmer
Mar 13, 2000
200
US
Hi,<br><br>I have created a console app in VC++ and I want to display the current time using the following code:<br><br>#include &quot;stdafx.h&quot;<br>#include &lt;Afxdisp.h&gt;<br>#include &lt;iostream.h&gt;<br><br>int main()<br>{<br>COleDateTime Date_Time;<br>Date_Time = COleDateTime::GetCurrentTime();<br>cout &lt;&lt; Date_Time.Format(&quot;Today is %a %b %d, %y&quot;);<br><br> return 0;<br>}<br><br>However when I run it I get the following errors:<br><br>nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadex<br><br>nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __beginthreadex<br><br>Anyone have any ideas?<br><br>Cory<br>
 
Dear Smilee,<br><br>It would appear that you don't have the MFC library linked into your project.<br><br>If you have VC.6 there should be an &quot;MFC Console&quot; application wizard that will set the project up for you.<br><br>Hope this helps<br>-pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top