error MSB3073: :VCEnd" exited with code 2

6.1k Views Asked by At

I Know this problem been posted and I search the internet looking for the solution of my problem. I am new to programming and I try to find the answer before posting my problem. I am trying to do a code interface node for Labview. Follow the direction and of course search on the internet. I setup my environment variables to point where my files are at. I set up the property page and were I am having the trouble at is on the command line in the custom build set up. I enter the following command:

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

and for the Output I enter

    $(OutDir) $(TargetName).lsb.

` when I build the code I get the following.

'
    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 ==========`

I went into the command line to double check for double spacing or not enough. I read the other article that been posted and try some of the codes. So if someone could tell me if I set up the command right please let me know. Thanks

1

There are 1 best solutions below

0
On

I finally found out that the issue was from trying to use two different version software. After over a week and many hours on the internet searching for an answer I came across an article on how to make the lsb file. First I had to remove the custom build commands and output from the property manager. rebuild the program to create my release folder under my project. once this was done i follow the following steps:

Executing cmd.exe When Compiling a CIN in VC++

You can reduce the introduction of typing errors and mis-quoting by following these steps:

1.  Go to the start button and click run. Then type cmd in the command window and hit enter.
  1. Browse to the directory that has lvsbutil.exe (in the cintools directory under LabVIEW), drag the lvsbutil.exe onto the cmd window. This will correctly quote the executable.
  2. Browse to the folder that holds your dll, this is usually in /Debug of your project's directory, verify that a dll has been created there.
  3. In the cmd window, type the following command: project_name -d
  4. Drag the folder that contains the dll onto the cmd window, and press enter. You should see LabVIEW resource file with the following properties created properly: type: CIN name: sharedcin.lsb

The .lsb file will be built in the same directory as the DLL.

Note: LabVIEW must be installed on the computer that the VC++ code is compiled on. Simply copying the cintools directory to the computer that will compile your code without having LabVIEW installed will cause an error when linking.