編譯錯誤問題!!!
程序編譯時出現如下提示:
Linking...
LINK : fatal error LNK1104: cannot open file "mfc42ud.lib"
Error executing link.exe.
請問是如何引起的?應該如何解決?
另外,出現如下,又是什麼錯誤?
Compiling...
StdAfx.cpp
..\atl\include\atlctl.h(2963) : error C2504: 'IBindStatusCallback' : base class undefined ..\atl\include\atlctl.h(3162) : see reference to class template instantiation 'ATL::CBindStatusCallback<T>' being compiled
问题点数:50、回复次数:12Top
1 楼Hendy_So(横笛)回复于 2003-09-02 18:52:43 得分 10
第一个问题,可能是你选的的编译工程的类型不对,选debug或release即可,不要选什么unicodedebug。Top
2 楼broaderz(周博不通)回复于 2003-09-02 19:00:16 得分 30
从你的VC安装盘中找到mfc42ud.lib,应该在\VS60\VC98\MFC目录下,考到你的VC98的安装目录中\Program Files\Microsoft Visual Studio\VC98\MFC\Lib,再编译时还有类似的提示,提示什么你就考什么就好了。Top
3 楼aiirii(ari-http://spaces.msn.com/members/aiirii/)回复于 2003-09-02 19:14:30 得分 0
我的系統需要用Unicode 啊!!Top
4 楼broaderz(周博不通)回复于 2003-09-02 19:31:42 得分 0
像mfc42ud.lib之类的文件就是支持Unicode的,你还需要其他库文件,提示什么你就拷什么,直到编译通过就行了。应该没错的。Top
5 楼aiirii(ari-http://spaces.msn.com/members/aiirii/)回复于 2003-09-02 20:25:45 得分 0
第一個問題已經解決了,但第二個錯誤呢?請指點,\atl\include\atlctl.h 是個系統自帶的文件,為什麼會出現說錯誤呢??Top
6 楼broaderz(周博不通)回复于 2003-09-02 20:45:07 得分 0
编译错误要在语法上着手,应该还是头文件的问题。stdfax.h载入的是其他的mfc头文件。具体问题实在不好确定。Top
7 楼aiirii(ari-http://spaces.msn.com/members/aiirii/)回复于 2003-09-03 09:42:35 得分 0
難道沒有人碰到過類似問題,我估計可能我include少了一個.h文件吧,因為提示說base class undefined,基類沒定義,但這個是系統自帶的,只是不知道如何解決!Top
8 楼aiirii(ari-http://spaces.msn.com/members/aiirii/)回复于 2003-09-03 09:46:09 得分 0
詳細提示如下:
Compiling...
StdAfx.cpp
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlctl.h(2963) : error C2504: 'IBindStatusCallback' : base class undefined
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlctl.h(3162) : see reference to class template instantiation 'ATL::CBindStatusCallback<T>' being compiled
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlctl.h(2982) : error C2061: syntax error : identifier 'IBinding'
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlctl.h(3162) : see reference to class template instantiation 'ATL::CBindStatusCallback<T>' being compiled
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlctl.h(3022) : error C2061: syntax error : identifier 'BINDINFO'
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlctl.h(3162) : see reference to class template instantiation 'ATL::CBindStatusCallback<T>' being compiled
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlctl.h(3156) : error C2065: 'IBinding' : undeclared identifier
C:\Windows CE Tools\wce300\Pocket PC 2002\atl\include\atlctl.h(3162) : see reference to class template instantiation 'ATL::CBindStatusCallback<T>' being compiled
Error executing clarm.exe.
Top
9 楼kingzai(stevenzhu)回复于 2003-09-03 10:04:30 得分 10
Did you try to include urlmon.h header file where IBindStatusCallback is
defined?
Top
10 楼aiirii(ari-http://spaces.msn.com/members/aiirii/)回复于 2003-09-03 10:40:52 得分 0
幫助里提示:
The base class is declared but never defined.
Possible cause
Missing include file.
External base class not declared with extern.
但我檢查了,在atlctl.h 有include urlmon.h 啊,大小寫有問題嗎?還是還要include 其它??
Top
11 楼aiirii(ari-http://spaces.msn.com/members/aiirii/)回复于 2003-09-03 18:30:50 得分 0
問題已經解決,我在
stdafx.cpp中加入
#include "urlmon.h"就可了,但我還是不明白,在atlctl.h 中,明明已經有了#include "urlmon.h"字句,為什麼還要加??
我已經可以給分了,但我期望有人能給個解釋,不要讓我似懂非懂!!
Top
12 楼aiirii(ari-http://spaces.msn.com/members/aiirii/)回复于 2003-09-03 18:45:02 得分 0
有個新問題,在這裹提問,如解決,開再開新貼給分!
Linking...
mfcs42ud.lib(dllmodul.obj) : error LNK2005: _DllMain@12 already defined in ListViewUI.obj
mfcs42ud.lib(dllmodul.obj) : warning LNK4006: _DllMain@12 already defined in ListViewUI.obj; second definition ignored
Creating library DebugU/ListViewUI.lib and object DebugU/ListViewUI.exp
DebugU/ListViewUI.dll : fatal error LNK1169: one or more multiply defined symbols found
Error executing link.exe.
ListViewUI.dll - 2 error(s), 1 warning(s)Top




