Help! "Link error"!!! 
Author Message
 Help! "Link error"!!!

THIS IS THE ERROR I GET FROM THE COMPILER... PLEASE HELP
ITS DRIVING ME NUTS!!!
Linking...
LINK : LNK6004: Debug/test.exe not found or not built by the last
incremental link; performing full link
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
__endthreadex
nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
__beginthreadex
libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
Debug/test.exe : fatal error LNK1120: 3 unresolved externals
Error executing link.exe.

This should work.  I got it from a book plus i aslo got similar code from
other sites.  What am i doing wrong that it won't compile.. "beginner"

#include <afxwin.h>

class MyWnd : public CFrameWnd
{
public:
 MyWnd();
 DECLARE_MESSAGE_MAP();

Quote:
};

class MyApp : public CWinApp
{
public:
 BOOL InitInstance();

Quote:
};

MyWnd::MyWnd()
{
 Create(NULL, "Test");

Quote:
}

BOOL MyApp::InitInstance()
{
 m_pMainWnd = new MyWnd;
 m_pMainWnd->ShowWindow(m_nCmdShow);
 m_pMainWnd->UpdateWindow();

 return TRUE;

Quote:
}

BEGIN_MESSAGE_MAP(MyWnd, CFrameWnd)
END_MESSAGE_MAP()

MyApp app;



Fri, 28 Sep 2001 03:00:00 GMT  
 Help! "Link error"!!!
Go to project->settings->C++->code generation->Use run-time libray:
Multithreaded
Make sure you are linking with the mutithread libraries.

regards,
Kurt


Quote:
> THIS IS THE ERROR I GET FROM THE COMPILER... PLEASE HELP
> ITS DRIVING ME NUTS!!!
> Linking...
> LINK : LNK6004: Debug/test.exe not found or not built by the last
> incremental link; performing full link
> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
> __endthreadex
> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
> __beginthreadex
> libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> Debug/test.exe : fatal error LNK1120: 3 unresolved externals
> Error executing link.exe.

> This should work.  I got it from a book plus i aslo got similar code from
> other sites.  What am i doing wrong that it won't compile.. "beginner"

> #include <afxwin.h>

> class MyWnd : public CFrameWnd
> {
> public:
>  MyWnd();
>  DECLARE_MESSAGE_MAP();
> };

> class MyApp : public CWinApp
> {
> public:
>  BOOL InitInstance();
> };

> MyWnd::MyWnd()
> {
>  Create(NULL, "Test");
> }

> BOOL MyApp::InitInstance()
> {
>  m_pMainWnd = new MyWnd;
>  m_pMainWnd->ShowWindow(m_nCmdShow);
>  m_pMainWnd->UpdateWindow();

>  return TRUE;
> }

> BEGIN_MESSAGE_MAP(MyWnd, CFrameWnd)
> END_MESSAGE_MAP()

> MyApp app;



Sat, 29 Sep 2001 03:00:00 GMT  
 Help! "Link error"!!!
Go to Project Settings->C++->Code Generation->Use run-time libaray:
multithreaded -or- multithreaded DLL

Rebuild All.

Provecho.

-Andy


Quote:
> THIS IS THE ERROR I GET FROM THE COMPILER... PLEASE HELP
> ITS DRIVING ME NUTS!!!
> Linking...
> LINK : LNK6004: Debug/test.exe not found or not built by the last
> incremental link; performing full link
> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
> __endthreadex
> nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
> __beginthreadex
> libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
> Debug/test.exe : fatal error LNK1120: 3 unresolved externals
> Error executing link.exe.

> This should work.  I got it from a book plus i aslo got similar code from
> other sites.  What am i doing wrong that it won't compile.. "beginner"

> #include <afxwin.h>

> class MyWnd : public CFrameWnd
> {
> public:
>  MyWnd();
>  DECLARE_MESSAGE_MAP();
> };

> class MyApp : public CWinApp
> {
> public:
>  BOOL InitInstance();
> };

> MyWnd::MyWnd()
> {
>  Create(NULL, "Test");
> }

> BOOL MyApp::InitInstance()
> {
>  m_pMainWnd = new MyWnd;
>  m_pMainWnd->ShowWindow(m_nCmdShow);
>  m_pMainWnd->UpdateWindow();

>  return TRUE;
> }

> BEGIN_MESSAGE_MAP(MyWnd, CFrameWnd)
> END_MESSAGE_MAP()

> MyApp app;



Sat, 29 Sep 2001 03:00:00 GMT  
 Help! "Link error"!!!
unresolved occurs because  the linker finds the prototype but  not the
body
Quote:

>THIS IS THE ERROR I GET FROM THE COMPILER... PLEASE HELP
>ITS DRIVING ME NUTS!!!
>Linking...
>LINK : LNK6004: Debug/test.exe not found or not built by the last
>incremental link; performing full link
>nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
>__endthreadex
>nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol
>__beginthreadex
>libcd.lib(crt0.obj) : error LNK2001: unresolved external symbol _main
>Debug/test.exe : fatal error LNK1120: 3 unresolved externals
>Error executing link.exe.

>This should work.  I got it from a book plus i aslo got similar code from
>other sites.  What am i doing wrong that it won't compile.. "beginner"

>#include <afxwin.h>

>class MyWnd : public CFrameWnd
>{
>public:
> MyWnd();
> DECLARE_MESSAGE_MAP();
>};

>class MyApp : public CWinApp
>{
>public:
> BOOL InitInstance();
>};

>MyWnd::MyWnd()
>{
> Create(NULL, "Test");
>}

>BOOL MyApp::InitInstance()
>{
> m_pMainWnd = new MyWnd;
> m_pMainWnd->ShowWindow(m_nCmdShow);
> m_pMainWnd->UpdateWindow();

> return TRUE;
>}

>BEGIN_MESSAGE_MAP(MyWnd, CFrameWnd)
>END_MESSAGE_MAP()

>MyApp app;



Mon, 01 Oct 2001 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Help! "Link error"!!!

2. Error "free"-ing "malloc"-ed memory

3. "Floating point formats not linked" error

4. "communication link failure" error

5. "error LNK2001" when linking

6. "communication link failure" error

7. link error "unresolved externel symbol _htonl"

8. "communication link failure" error

9. ""help with TSR""

10. Use of Linked Lists "Help Please"

11. HELP needed "linking" 2 controls

12. Help Dll trouble.... Link error "__declspec(dllimport)

 

 
Powered by phpBB® Forum Software