2016-12-28 479 views
1

我知道這個問題已發佈,我搜索互聯網尋找我的問題的解決方案。我是編程新手,我試圖找到答案,然後發佈我的問題。 我試圖做的Labview代碼接口節點。按照課程搜索在互聯網上的方向和我安裝我的環境變量來點我的文件在我設置屬性頁,是我遇到的麻煩在自定義生成的命令行設置我輸入以下命令:錯誤MSB3073::VCEnd「退出代碼2

"$(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 ==========` 

我進入命令行來檢查雙倍間距或不夠。我讀了已發佈的其他文章並嘗試了一些代碼。所以如果有人能告訴我,如果我設置了命令權,請讓我知道。 感謝

+0

我終於找到了,這個問題是試圖使用兩個不同版本的軟件。過了一個星期,許多個小時在互聯網上尋找答案後,我讀到一篇文章,來了如何使LSB文件。首先,我必須從屬性管理器中刪除自定義構建命令和輸出。重建程序以在我的項目下創建我的發佈文件夾。一旦完成,我按照以下步驟進行: – Dorato

+0

是否有一個非常好的理由讓你創建一個CIN,而不僅僅是使用LabVIEW的DLL? – nekomatic

回答

1

我終於找到了,這個問題是試圖使用兩個不同版本的軟件。過了一個星期,許多個小時在互聯網上尋找答案後,我讀到一篇文章,來了如何使LSB文件。首先,我必須從屬性管理器中刪除自定義構建命令和輸出。重建程序以在我的項目下創建我的發佈文件夾。

1. Go to the start button and click run. Then type cmd in the command window and hit enter. 
:一旦這樣做是我遵循以下步驟:通過以下步驟

執行CMD.EXE當VC++

編譯CIN可以降低引進打字錯誤和錯誤引用

  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

的.lsb文件將被建在同一目錄下的DLL。

注:必須是VC++代碼被編譯在計算機上安裝的LabVIEW。只需將cintools目錄複製到將在未安裝LabVIEW的情況下編譯代碼的計算機,將會在鏈接時導致錯誤。

相關問題