日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Vs2010编译错误集

發(fā)布時間:2025/3/21 编程问答 24 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Vs2010编译错误集 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1、error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

在項目屬性->Configration Properties->C/C++->Command Line頁面的Additional Options中加入/wd4430


2、error MSB3073: The command regsvr32 /s /c 解決辦法??

最近將VC2002 代碼移植到VC2010,出現(xiàn)編譯錯誤:

1>C:\Program?Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5):?error?MSB3073:?The?command?"regsvr32?/s?/c?"D:\VC++Prj\source?code\zutai\cha06\Meter\.\Debug\Meter.dll"?

1>C:\Program?Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5):?error?MSB3073:?echo?regsvr32?exec.?time?>?".\Debug\regsvr32.trg"

1>C:\Program?Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5):?error?MSB3073:?:VCEnd"?exited?with?code?3.

英文版處理辦法:?

Project->Configuration?Properties->General->Target?Extension設(shè)置為.ocx?或者.dll

Project->Configuration?Properties->Linkerl->General?->Output?File設(shè)置為$(OutDir)$(ProjectName)$(TargetExt)

中文版處理辦法:?

在項目上點右鍵,選擇“屬性”->“配置屬性”->“常規(guī)”->“目標(biāo)文件擴(kuò)展名”設(shè)置為.ocx?或者.dll

在項目上點右鍵,選擇“屬性”->“配置屬性”->“鏈接器”->“?常規(guī)?->“輸出文件”設(shè)置為$(OutDir)$(ProjectName)$(TargetExt)

3、altdef.h?都是這個文件里的定義

#ifndef?ATLTRY
#define?ATLTRY(x)?ATLTRYALLOC(x)
#endif //ATLTRY

出問題的都是這個宏
ATLTRY(szKey?=?new?TCHAR[cbKey]);
ATLTRY(pszW.Allocate(_convert));
??????????????????ATLTRY(szReg.Allocate(dwSize?+?1));


1>FilterImageGrabber.cpp
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(954)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(954)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(970)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(970)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(995)?:?error?C2712:?無法在要求對象展開的函數(shù)中使用?__try
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(1008)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(1008)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(1024)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(1024)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(1190)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\atlcomcli.h(1190)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(107)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(107)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(113)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(113)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(423)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(423)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(587)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(587)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(901)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(901)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(971)?:?error?C2059:?語法錯誤?:?“catch”
1>C:\Program?Files\Microsoft?Visual?Studio?9.0\VC\atlmfc\include\statreg.h(971)?:?error?C2143:?語法錯誤?:?缺少“;”(在“{”的前面)

?

原來是工程屬性-〉預(yù)定義里的問題,它在里面定義了try=_try,把這個刪除就OK了

?

4、

Error MSB3073 exited with code 3

The issue that causes "Error MSB3073 exited with code 3" happens to be with the VALUE in the?Outputs?property under?Project > Properties > Configuration Properties > Custom Build Step.

When I choose Edit for Outputs, a dialog box comes up.? I enter a value of "$(OutDir)\regsvr32.trg" in the upper textbox then click OK.? Now for some reason VS 2010 changes the display text to show "$(OutDir)\regsvr32.trg;%(Outputs)".? I'm not sure why or if that is the cause of the problem.

However, I will get "Build Successful" if I change my Output value to "<inherit from parent or project defaults>" instead of choosing Edit and putting a value in.? No more Error MSB3073 exited with code 3.

I guess I can say this issue is resolved but I'd like to know why/what causes this issue to begin with.

?

5、 fatal error LNK1181: cannot open input file'largeint.lib'
在linker->Input->Additional Dependencies中去掉largeint.lib

6、error MSB3073
最近將VC2002 代碼移植到VC2010,出現(xiàn)編譯錯誤:
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: The command "regsvr32 /s /c "D:\VC++Prj\source code\zutai\cha06\Meter\.\Debug\Meter.dll"
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: echo regsvr32 exec. time > ".\Debug\regsvr32.trg"
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: :VCEnd" exited with code 3.
英文版處理辦法:?
Project->Configuration Properties->General->Target Extension設(shè)置為.ocx 或者.dll
Project->Configuration Properties->Linkerl->General ->Output File設(shè)置為$(OutDir)$(ProjectName)$(TargetExt)
中文版處理辦法:?
在項目上點右鍵,選擇“屬性”->“配置屬性”->“常規(guī)”->“目標(biāo)文件擴(kuò)展名”,設(shè)置為.ocx 或者.dll
在項目上點右鍵,選擇“屬性”->“配置屬性”->“鏈接器”->“ 常規(guī) ”->“輸出文件”,設(shè)置為$(OutDir)$(ProjectName)$(TargetExt)

?

?

7、error D8016: '/ZI' and '/GL' command-line options are incompatible

把Debug調(diào)試項改為/ZI /Od
Project Settings 項->C/C++ -> General

?

8、fatal error C1189: #error :? This file requires _WIN32_WINNT to be #defined at least to 0x0403. Value 0x0501 or higher is recommended.

C/C++->Preprocessor->Preprocessor Definitions中的_WIN32_WINNT=0x0501改掉就可以了

?

9、C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlcomcli.h(1101): error C2059: syntax error : 'catch'
1>C:\Program Files\Microsoft Visual Studio 10.0\VC\atlmfc\include\atlcomcli.h(1101): error C2143: syntax error : missing ';' before '{'


C/C++->Preprocessor->Preprocessor Definitions 下面的try=__try去掉。

?

10、regsvr32無法注冊控件
depends.exe打開要注冊的控件,找出這個控件所依賴的文件,缺少的文件在網(wǎng)上下載下來,補上就可以了。

11、Graphedt.exe打開后在任務(wù)欄里面有,但是點擊后無法顯示
打開任務(wù)管理器,在應(yīng)用程序中找到Graphedt.exe,右擊選擇最大化就可以看見程序了。

12、開機自啟動的注冊表目錄:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run下面,如果要開機啟動某個程序,只要把這個程序的路徑下載這個位置就可以了。

13、彈出對話框“attempt an unsupport operation!”,是因為被關(guān)聯(lián)的控件的ID號和DoDataExchange中的控件ID不同。

14、“Encountered an improper argument”,控件被刪除了,但是還有代碼對控件進(jìn)行操作而導(dǎo)致的

?

15、C:\Program Files\Microsoft SDKs\Windows\v7.0A\include\winioctl.h(39): error C2374: 'GUID_DEVINTERFACE_DISK' : redefinition; mult
重復(fù)包含了頭文件“winioctl.h”


16、error C2059: syntax error : 'catch'
右鍵點擊工程名,properties->Configuration Properties->C/C++->PreProcessor->Preprocessor Definitions中將try=__try去掉即可!


17、>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: The command "regsvr32 /s /c D:\DirectShow及協(xié)議資料\DirectShow 實務(wù)精選+源碼\DirectShow實務(wù)精選源碼\SourceCodes\Chapter03\VODDemo\FilterNetReceiver\.\Release\FilterNetReceiver.dll
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: echo regsvr32 exec.time > D:\DirectShow及協(xié)議資料\DirectShow 實務(wù)精選+源碼\DirectShow實務(wù)精選源碼\SourceCodes\Chapter03\VODDemo\FilterNetReceiver\Release\FilterNetReceiver.trg
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: :VCEnd" exited with code 3.


18、error MSB3073
最近將VC2002 代碼移植到VC2010,出現(xiàn)編譯錯誤:
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: The command "regsvr32 /s /c "D:\VC++Prj\source code\zutai\cha06\Meter\.\Debug\Meter.dll"
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: echo regsvr32 exec. time > ".\Debug\regsvr32.trg"
1>C:\Program Files\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: :VCEnd" exited with code 3.
英文版處理辦法:?
Project->Configuration Properties->General->Target Extension設(shè)置為.ocx 或者.dll
Project->Configuration Properties->Linkerl->General ->Output File設(shè)置為$(OutDir)$(ProjectName)$(TargetExt)
中文版處理辦法:?
在項目上點右鍵,選擇“屬性”->“配置屬性”->“常規(guī)”->“目標(biāo)文件擴(kuò)展名”,設(shè)置為.ocx 或者.dll
在項目上點右鍵,選擇“屬性”->“配置屬性”->“鏈接器”->“ 常規(guī) ”->“輸出文件”,設(shè)置為$(OutDir)$(ProjectName)$(TargetExt)

這個仍然不能解決的話就將“屬性”->“配置屬性”->“鏈接器”->Custom Build Step中的Command line,Description,Outputs都選為默認(rèn)值。即去除? 不要自注冊。



19、error C2872: “CString”: 不明確的符號?
?
DUILIB與MFC的結(jié)合
會產(chǎn)生Crect等沖突。
解決方法:
1:在stdafx.h中添加
#if USE(DuiLib)
#define ?CRect DuiLib::CRect
#define ?CPoint DuiLib::CPoint
#define ?CSize DuiLib::CSize
#else
#define CRect ::CRect
#define ?CPoint ::CPoint
#define ?CSize ::CSize
#endif
在用的地方定義DuiLib
2:將duilib中的crect工程中全部改名Cduirect等。全工程替換。不過一分鐘的事。
3:不在MFC中使用 using namespace Duilib 在使用duilib時都加上Duilib::Crect。


20、關(guān)于這樣的錯誤 libcpmtd.lib(string.obj) : error LNK2005: "public: void __thiscall


VC2008下 在一個動態(tài)庫工程中, 改成了編程靜態(tài)庫, 成功編譯, 但使用靜態(tài)庫的工程編譯時就出現(xiàn)下面一堆連接錯誤.
?
經(jīng)過查找 解決方法如下:
說是因為 Project->C/C++->Code Generation->Runtime Library 這個選項,LIB和主程序(EXE)里選擇的不一致引起的。后來改成一樣就好了。
?
把exe工程 改為/MTD(因為Lib工程是選擇/MTD的) 編譯還是錯誤
于是 把EXE工程和Lib工程都選擇為/MDD 成功編譯



21、error?C2159:?more?than?one?storage?class?specified?

將vc6.0的工程轉(zhuǎn)換成vs2008居然就編譯通過了


22、error C2872: 'ostream' : ambiguous symbol

改變了#include <iostream>的位置就好了

?

總結(jié)

以上是生活随笔為你收集整理的Vs2010编译错误集的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。

主站蜘蛛池模板: 国产第一页第二页 | 五月伊人婷婷 | 波多av| 久久一区二区三区四区 | 91综合久久 | wwwxxx在线播放 | 亚洲久视频 | 久久久久国色av免费观看性色 | 日韩一区二区在线视频 | 日韩毛片一级 | 国产精品一区二区无码对白 | 在线观看黄色av网站 | 国产中文字幕一区二区 | 99国产精品久久久久 | 在线观看wwww | 韩日精品在线 | 在线天堂一区 | 大尺度电影在线 | 日韩视频在线播放 | 亚洲 欧洲 日韩 | brazzers精品成人一区 | 杏导航aⅴ福利网站 | 欧美一区二区三区在线看 | 国产swag在线观看 | 嫩草社区 | 欧美一区二区在线观看视频 | 亚洲精品偷拍 | 国产免费看黄 | 日本精品免费一区二区三区 | 伊人久久九 | 韩国av毛片 | 极品尤物魔鬼身材啪啪仙踪林 | 校园春色亚洲激情 | 成人做爰免费视频免费看 | 波多野结衣视频在线播放 | 久久丁香网| 久久久久久无码精品大片 | 嫩草嫩草嫩草 | 久久久久久久久久免费视频 | 欧美黑人一区二区 | 水密桃av | 日本精品在线观看 | 午夜亚洲天堂 | 亚洲黄色精品视频 | 2020亚洲男人天堂 | 成人激情小视频 | 久久久精品免费 | 欧美综合成人 | 国产野外作爱视频播放 | 老司机av影院 | 久久99精品国产91久久来源 | 在线1区 | 中文字幕久久熟女蜜桃 | 91免费国产在线 | 欧美午夜精品久久久久久孕妇 | 激情四射网 | 免费性情网站 | 国产不卡视频一区二区三区 | 日本免费网站在线观看 | www.xxx日韩 | 天堂在线播放 | 性开放视频 | 致命弯道8在线观看免费高清完整 | 中文天堂av | 欧洲高潮三级做爰 | 成人福利一区二区三区 | 免费在线观看一区二区 | 男女男精品视频网站 | 69av视频| 欧美一级特黄视频 | 日韩欧美国产精品 | 亚洲在线精品视频 | 欧美性猛交xx乱大交 | 欧美亚洲激情视频 | 中文字幕亚洲欧美日韩 | 毛片天天看| 狠狠艹视频 | 91午夜交换视频 | 欧美另类老妇 | 久久久久亚洲AV | 亚洲AV无码成人精品一区 | 日本亚洲国产 | 17c在线视频 | 午夜精品导航 | 538任你躁在线精品免费 | 人妻精品一区二区在线 | 丰满少妇aaaaaa爰片毛片 | 国产乱码精品一区二区 | 浪潮av一区二区三区 | 亚洲精品日韩综合观看成人91 | 一级丰满大乳hd高清 | 成人日韩在线 | 老司机福利院 | 国产极品久久 | 国产成人午夜精品无码区久久 | 91久久精品www人人做人人爽 | av黄色在线看 | 亚洲精品av中文字幕在线在线 | 亚洲AV成人无码网站天堂久久 |