Visual Studio compilation error set (GO)

Source: Internet
Author: User

1, error c4430:missing type Specifier-int assumed. Note:c++ does not support Default-int

Add/wd4430 to the additional options in the project Properties->configration Properties->c/c++->command Line page

2.Error msb3073:the Command regsvr32/s/C solution

Recently ported VC2002 code to VC2010, a compilation error occurred:

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.

English version of the processing method:

Project->configuration properties->general->target extension set to. ocx or. dll

Project->configuration properties->linkerl->general->output file is set to $ (OutDir) $ (ProjectName) $ ( Targetext)

Chinese version processing method:

Right-click on the project, select Properties, Configuration Properties, general, target file name extension, set to. ocx or. dll

Right-click on the project, select Properties, Configuration Properties, linker, general, output file, set to $ (OutDir) $ (ProjectName) $ (targetext)

3, Altdef.h is the definition of this document

#ifndef Atltry
#define ATLTRY (x) atltryalloc (x)
#endif//atltry

This is the macro that went wrong.
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: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (954): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (970): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (970): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (995): Error C2712: Cannot use __ in a function that requires an object to be expanded Try
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (1008): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (1008): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (1024x768): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (1024x768): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (1190): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\atlcomcli.h (1190): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (107): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (107): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (113): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (113): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (423): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (423): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (587): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (587): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (901): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (901): Error C2143: syntax error: Missing ";" (in front of "{")
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (971): Error C2059: syntax error: "Catch"
1>c:\program Files\Microsoft Visual Studio 9.0\vc\atlmfc\include\statreg.h (971): Error C2143: syntax error: Missing ";" (in front of "{")

Originally is the project attribute-〉 in the predefined question, it defines the try=_try in the inside, the deletion is OK

4.

Error MSB3073 exited with code 3

The issue that causes ' Error MSB3073 exited with code 3 ' happens to is with the VALUE of the Outputs Property und Er 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 and then click OK. Now for some reason VS. Changes the display text to show "$ (OutDir) \regsvr32.trg;% (  Outputs) ". I ' m not sure why or if this is the cause of the problem.

However, I'll get "Build successful" If I change my Output value to "<inherit from parent or project Defaults>" in  stead of choosing Edit and putting a value in. No more Error MSB3073 exited with code 3.

I guess I can say this issue was 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 '
Remove Largeint.lib from the linker->input->additional dependencies

6. Error MSB3073
Recently ported VC2002 code to VC2010, a compilation error occurred:
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.
English version of the processing method:
Project->configuration properties->general->target extension set to. ocx or. dll
Project->configuration properties->linkerl->general->output file is set to $ (OutDir) $ (ProjectName) $ ( Targetext)
Chinese version processing method:
Right-click on the project, select Properties, Configuration Properties, general, target file name extension, set to. ocx or. dll
Right-click on the project, select Properties, Configuration Properties, linker, general, output file, set to $ (OutDir) $ (ProjectName) $ (targetext)

7. Error D8016: '/zi ' and '/GL ' command-line options are incompatible

Change debug debugging item to/zi/od
Project Settings Item->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 in the _win32_winnt=0x0501 to get rid of it.

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 below the try=__try removed.

10. regsvr32 cannot register the control
Depends.exe Open the control you want to register, find out which file the control depends on, and download the missing files on the web.

11, Graphedt.exe after opening in the taskbar, but can not be displayed after the click
Open Task Manager, find the Graphedt.exe in the application, right click to select Maximize to see the program.

12, boot from the registry directory: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run below, if you want to boot a program, Just take the path of this program and download it to the location.

13. Pop-Up dialog "attempt an unsupport operation!" because the ID number of the associated control is different from the control ID in DoDataExchange.

14, "encountered an improper argument", the control is deleted, but there is code to manipulate the control caused by

15, C:\Program Files\Microsoft Sdks\windows\v7.0a\include\winioctl.h (): Error C2374: ' Guid_devinterface_disk ': redefinition; Mult
The header file "Winioctl.h" was included repeatedly


16. Error C2059:syntax error: ' Catch '
Right click on the project name, properties->configuration properties->c/c++->preprocessor->preprocessor definitions will try=__ Try to remove the can!


17, >c:\program files\msbuild\microsoft.cpp\v4.0\microsoft.cppcommon.targets (183,5): Error msb3073:the Command "REGSVR32/S/C D:\DirectShow and protocol data \directshow practice selected + Source \directshow practice selected source \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 and Protocol Data \directshow practice selection + source \ DirectShow Practice Select Source \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
recently ported VC2002 code to VC2010, a compilation error occurred:
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.
The English version of the method:  
project->configuration properties->general->target extension set to. ocx or. dll
Project->configuration properties->linkerl->general->output file is set to $ (OutDir) $ (ProjectName) $ ( Targetext)
Chinese version of the method:  
Right-click on the project, select Properties, Configuration Properties, general, target file name extension, set to. ocx or. dll
Right-click on the project, select Properties, configuration Properties, linker, general, output file, set to $ (OutDir) $ (ProjectName) $ (targetext)

This is still not going to work. Select the command line,description,outputs in the->custom Build step of the properties, configuration properties, linker, to be the default values. The removal is not self-registering.

19, Error C2872: "CString": ambiguous symbol

The combination of Duilib and MFC
will produce crect and other conflicts.
Workaround:
1: Add in 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
Define Duilib in the place of use
2: The Duilib in the CRect project all renamed Cduirect and so on. Whole project replacement. It's only a minute.
3: Do not use the using namespace Duilib in MFC with Duilib::crect when using Duilib.


20, about this error libcpmtd.lib (string.obj): Error LNK2005: "Public:void __thiscall


VC2008 in a dynamic library project, changed to a programming static library, successfully compiled, but the use of static library of the project compiled with the following pile of connection errors.

Here's how to find a solution:
That is because Project->c/c++->code generation->runtime Library this option, Lib and the main program (EXE) in the selection of inconsistencies caused. It would be nice to change it later.

Change EXE project to/MTD (because Lib Project chooses/MTD) compile or error
So the EXE project and Lib project are selected for/MDD successful compilation

21. Error C2159:more than one storage class specified

Convert the vc6.0 project into a vs2008.

22. Error C2872: ' ostream ': ambiguous symbol

It's good to change the location of # include <iostream>.

Visual Studio compilation error set (GO)

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.