错误MSB3073 :: VCEnd“退出代码2

时间:2016-12-28 20:07:54

标签: c++ labview

我知道这个问题已经发布,我在互联网上搜索我的问题的解决方案。我是编程新手,我在发布问题之前尝试找到答案。   我正在尝试为Labview做一个代码接口节点。按照方向,当然在互联网上搜索。我将环境变量设置为指向我的文件所在的位置。我设置了属性页面,我在自定义构建设置的命令行上遇到了麻烦。我输入以下命令:

"$(CINTOOLSDIR)\lvsbutil" "$(TargetName)" -d "$(OutDir)"

输出我输入

    $(OutDir) $(TargetName).lsb.

`  当我构建代码时,我得到以下内容。

'
    Project: SimpleCIN2010, Configuration: Release Win32 ------
    1>C:\Program Files(x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(298,5): warning     MSB8004: Intermediate Directory does not end with a trailing slash.  This build instance will add the slash as it is required to allow proper evaluation of the Intermediate Directory.
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppBuild.targets(299,5): warning MSB8004: Output Directory does not end with a trailing slash.  This build instance will add the slash as it is required to allow proper evaluation of the Output Directory.

    1>  SimpleCIN2010.cpp
    1>  Microsoft (R) Incremental Linker Version 10.00.40219.01
    1>  Copyright (C) Microsoft Corporation.  All rights reserved.
    1>  
    1>  "/OUT:.\Release\SimpleCIN2010.dll" /INCREMENTAL "/LIBPATH:C:\Program Files (x86)\National Instruments\LabVIEW 8.6\cintools" cin.obj labview.lib lvsb.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "/DEF:C:\Program Files (x86)\National Instruments\LabVIEW 8.6\cintools\lvsbmain.def" /MANIFEST "/ManifestFile:.\Release\SimpleCIN2010.dll.intermediate.manifest" "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /DEBUG "/PDB:C:\Users\XXX\Documents\Visual Studio 2010\Projects\CIN VC2010\SimpleCIN2010\SimpleCIN2010\Release\SimpleCIN2010.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:.\Release\SimpleCIN2010.lib" /MACHINE:X86 /DLL .\Release\SimpleCIN2010.dll.embed.manifest.res 
    1>  .\Release\SimpleCIN2010.obj 
    1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
    1>SimpleCIN2010.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
    1>     Creating library .\Release\SimpleCIN2010.lib and object .\Release\SimpleCIN2010.exp
    1>  Microsoft (R) Incremental Linker Version 10.00.40219.01
    1>  Copyright (C) Microsoft Corporation.  All rights reserved.
    1>  
    1>  "/OUT:.\Release\SimpleCIN2010.dll" /INCREMENTAL "/LIBPATH:C:\Program Files (x86)\National Instruments\LabVIEW 8.6\cintools" cin.obj labview.lib lvsb.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib "/DEF:C:\Program Files (x86)\National Instruments\LabVIEW 8.6\cintools\lvsbmain.def" /MANIFEST "/ManifestFile:.\Release\SimpleCIN2010.dll.intermediate.manifest" "/MANIFESTUAC:level='asInvoker' uiAccess='false'" /DEBUG "/PDB:C:\Users\XXX\Documents\Visual Studio 2010\Projects\CIN VC2010\SimpleCIN2010\SimpleCIN2010\Release\SimpleCIN2010.pdb" /SUBSYSTEM:WINDOWS /OPT:REF /OPT:ICF /TLBID:1 /DYNAMICBASE /NXCOMPAT "/IMPLIB:.\Release\SimpleCIN2010.lib" /MACHINE:X86 /DLL .\Release\SimpleCIN2010.dll.embed.manifest.res 
    1>  .\Release\SimpleCIN2010.obj 
    1>LINK : warning LNK4075: ignoring '/INCREMENTAL' due to '/OPT:ICF' specification
    1>SimpleCIN2010.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/OPT:ICF' specification
    1>     Creating library .\Release\SimpleCIN2010.lib and object .\Release\SimpleCIN2010.exp
    1>  SimpleCIN2010.vcxproj -> C:\Users\XXXX\Documents\Visual Studio 2010\Projects\CIN VC2010\SimpleCIN2010\SimpleCIN2010\.\Release\SimpleCIN2010.dll
    1>  C:\Program Files (x86)\National Instruments\LabVIEW 8.6\cintools\lvsbutil: error building resource file: 1
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: The command ""C:\Program Files (x86)\National Instruments\LabVIEW 8.6\cintools\lvsbutil" "SimpleCIN2010" -d ".\Release\"
    1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\Microsoft.CppCommon.targets(183,5): error MSB3073: :VCEnd" exited with code 2.
       ========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========`

我进入命令行仔细检查双倍间距或不够。我阅读了已发布的其他文章并尝试了一些代码。所以,如果有人能告诉我我是否正确设置了命令,请告诉我。 感谢

1 个答案:

答案 0 :(得分:1)

我终于发现问题来自于尝试使用两种不同版本的软件。在互联网上搜索一个答案超过一个星期和几个小时后,我遇到了一篇关于如何制作lsb文件的文章。首先,我必须从属性管理器中删除自定义构建命令和输出。重建程序以在我的项目下创建我的发布文件夹。完成后,我按照以下步骤操作:

在VC ++中编译CIN时执行cmd.exe

您可以按照以下步骤减少输入错误和错误引用的引入:

1.  Go to the start button and click run. Then type cmd in the command window and hit enter.
  1. 浏览到包含lvsbutil.exe的目录(在LabVIEW下的cintools目录下),将lvsbutil.exe拖到cmd窗口。这将正确引用可执行文件。
  2. 浏览到包含dll的文件夹,这通常位于项目目录的/ Debug中,验证是否已在那里创建了一个dll。
  3. 在cmd窗口中,键入以下命令:project_name -d
  4. 将包含dll的文件夹拖到cmd窗口,然后按Enter键。 您应该看到LabVIEW资源文件,其中正确创建了以下属性: 类型:CIN 名称:sharedcin.lsb
  5. .lsb文件将与DLL构建在同一目录中。

    注意:LabVIEW必须安装在编译VC ++代码的计算机上。只需将cintools目录复制到将在没有安装LabVIEW的情况下编译代码的计算机,链接时就会出错。

相关问题