VC beginner's problem? 
Author Message
 VC beginner's problem?

Quote:

> I'm using VC++5.0
> I new a Win32 Application project and name it "Hello"?add the Hello.cpp to
> this project.

> code as followso

> //HELLO.CPP
> #include <afxwin.h>
> // define a CFrameWnd object
> class CHelloFrame : public CFrameWnd
> {
> public:
> CHelloFrame()
>    {Create(NULL,"Hello World!",WS_OVERLAPPEDWINDOW,rectDefault);}
> };

> // define a CWinApp object
> class CHelloApp : public CWinApp
> {
> public:
> virtual BOOL InitInstance();
> };

> //reload CWinApp member function InitInstance()
> BOOL CHelloApp::InitInstance()
> {
> m_pMainWnd = new CHelloFrame();
>     m_pMainWnd->ShowWindow(m_nCmdShow);
>     m_pMainWnd->UpdateWindow();
> return TRUE;
> }
> //define a CHelloApp object
> CHelloApp HelloApp;

> after build occur three errorso
> -----Configuration: HELLO - Win32 Debug------------
> Linking...
> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
> __endthreadex
> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
> __beginthreadex
> Debug/HELLO.exe : fatal error LNK1120: 2 unresolved externals
> Error executing link.exe.

> HELLO.exe - 3 error(s), 0 warning(s)

>          thank you for see the E-mail.

In Project Settings, C++ page, change the C runtime library setting to one of
the multithreaded options, typically Multithreaded DLL (Debug) for your debug
build settings and Multithreaded DLL for your release build settings.

--
Scott McPhillips [VC++ MVP]



Wed, 14 Aug 2002 03:00:00 GMT  
 VC beginner's problem?
I'm using VC++5.0
I new a Win32 Application project and name it "Hello"?add the Hello.cpp to
this project.

code as followso

//HELLO.CPP
#include <afxwin.h>
// define a CFrameWnd object
class CHelloFrame : public CFrameWnd
{
public:
CHelloFrame()
   {Create(NULL,"Hello World!",WS_OVERLAPPEDWINDOW,rectDefault);}

Quote:
};

// define a CWinApp object
class CHelloApp : public CWinApp
{
public:
virtual BOOL InitInstance();

Quote:
};

//reload CWinApp member function InitInstance()
BOOL CHelloApp::InitInstance()
{
m_pMainWnd = new CHelloFrame();
    m_pMainWnd->ShowWindow(m_nCmdShow);
    m_pMainWnd->UpdateWindow();
return TRUE;
Quote:
}

//define a CHelloApp object
CHelloApp HelloApp;

after build occur three errorso
-----Configuration: HELLO - Win32 Debug------------
Linking...
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
__endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
__beginthreadex
Debug/HELLO.exe : fatal error LNK1120: 2 unresolved externals
Error executing link.exe.

HELLO.exe - 3 error(s), 0 warning(s)

         thank you for see the E-mail.



Thu, 15 Aug 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. help a beginner's question with vc!

2. VC Beginner's Exception Question...

3. C's Windows DLLs: A beginner's problem

4. beginner: problems going from vc++ 5 to 6.0

5. Beginner's struct * sleepless nigh problem

6. Beginner's problem using command-line arguments.

7. Beginner's Problem

8. Beginner's C Problem!

9. I'm still having problems with namespaces (beginner, obviously ;-)

10. Problem with 'release' MS VC++6

11. a beginner's problem

12. 'C' beginner

 

 
Powered by phpBB® Forum Software