注册 登录
编程论坛 VC.NET论坛

[求助]运行时目标文件出现错误

飞人 发布于 2006-04-21 22:07, 2577 次点击

我运行程序时,单独运行各个应用文件时是正确的,可是我整个工程时总出现以下错误提示:
Circle.obj : error LNK2001: unresolved external symbol "public: __thiscall CAboutDlg::CAboutDlg(void)" (??0CAboutDlg@@QAE@XZ)
Debug/Circle.scr : fatal error LNK1120: 1 unresolved externals
Error executing link.exe.
我把工程文件扩展名exe.改为.scr
这什么原因呢?请帮忙哦 !谢谢了

5 回复
#2
十一月天2006-04-23 10:10
设置起始页了吗
#3
飞人2006-04-25 14:50
没有设置,这个问题可能是虚函数所引起的,现在运行正确,可是我打开Circle.scr 文件的时候,总说找不到相配的文件,这些文件都是(*.dll),大约有十几个,是不是我的系统文件(的特别是*.dll文件)有误呢?

还有一个问题是怎么进行应用程序打包?是不是还要用特别的软件,我用VC6.0,可是找不到啊。帮忙好吗?
谢谢楼上了!
#4
飞人2006-04-25 16:08

我打开调试信息,说是工程向导应用程序错误(即:Circle.scr Application) 而且包括这个文件的错误:
C:\DOCUME~1\ADMINI~1\LOCALS~1\Temp\a2d3_appcompat.txt
还有下面这个程序说明什么?它会影响到应用程序的运行吗?调试指针指向所带下划线的那行.

#include "stdafx.h"

#ifdef AFX_CORE1_SEG
#pragma code_seg(AFX_CORE1_SEG)
#endif

/////////////////////////////////////////////////////////////////////////////
// Standard WinMain implementation
// Can be replaced as long as 'AfxWinInit' is called first

int AFXAPI AfxWinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPTSTR lpCmdLine, int nCmdShow)
{
ASSERT(hPrevInstance == NULL);

int nReturnCode = -1;
CWinThread* pThread = AfxGetThread();
CWinApp* pApp = AfxGetApp();

// AFX internal initialization
if (!AfxWinInit(hInstance, hPrevInstance, lpCmdLine, nCmdShow))
goto InitFailure;

// App global initializations (rare)
if (pApp != NULL && !pApp->InitApplication())
goto InitFailure;

// Perform specific initializations
if (!pThread->InitInstance())
{
if (pThread->m_pMainWnd != NULL)
{
TRACE0("Warning: Destroying non-NULL m_pMainWnd\n");
pThread->m_pMainWnd->DestroyWindow();
}
nReturnCode = pThread->ExitInstance();
goto InitFailure;
}
nReturnCode = pThread->Run();

InitFailure:
#ifdef _DEBUG
// Check for missing AfxLockTempMap calls
if (AfxGetModuleThreadState()->m_nTempMapLock != 0)
{
TRACE1("Warning: Temp map lock count non-zero (%ld).\n",
AfxGetModuleThreadState()->m_nTempMapLock);
}
AfxLockTempMaps();
AfxUnlockTempMaps(-1);
#endif

AfxWinTerm();
return nReturnCode;
}

这个程序是系统自动产生的吗?怎么进行修改才能正确运行应用程序呢?
刚学的VC,不太了解这些,很希望您们帮忙,在下感激不尽!

#5
十一月天2006-04-26 08:47
VC6.0啊,你应该到VC板啊,这里是,没多少人来的,那里有高手,他们能帮你
#6
飞人2006-04-28 08:52

  我学的是VC.NET  但一直找不到相应的软件,可以告诉我哪里有这个软件能下载吗?谢谢了 
   刚上机的,所以有很多问题很难处理哦!
     还有VC.NET和VC6.0差别真很大吗?怎么总觉得运行环境是差不多的啊,

1