LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Custom build error with CIN in Visual C++ .NET

Hey guys, I'm having some trouble making a .lsb file in the IDE in Visual C++ .NET 2003. I'm using LabVIEW v7.0 and I followed the instruction in the External Code manual with the following exceptions:

1) The manual instructs me to go to Project>>Settings. That doesn't exist - however, there is a Project>>Properties that, unless I'm seriously mistaken, is pretty much the same thing. Every time the manual said Project>>Settings, I used Project>>Properties instead.
2) In step 6, the manual directs me to the "Additional include directories" field in the "Preprocessor" tab under "C/C++." The field doesn't exist - however, I did find a field called "Additional Include Directories" in the "General" tab. I used that instea
d.
3) In step 8, the field "Use run-time library" doesn't exist, but "Runtime Library" does and I believe it's the same thing, so I used it instead.
4) In step 9: I initially entered exactly the text shown in the manual, but Visual C++ .NET rejected the (WkspDir) macro. I looked on Google for a while and figured out that the Visual C++ .NET's (SolutionDir) macro is equivalent, and also includes the trailing backslash, so I used it instead. Here is the exact line in the "Command Line" field:
C:\Program Files\National Instruments\LabVIEW 7.0\cintools\lvsbutil "$(TargetName)" -d "$(SolutionDir)$(Outdir)"

I think that those changes are necessary, but obviously I could be wrong about that.

Anyway, when I try to build, I get this error message:
error PRJ0019: A tool returned an error code from "Performing Custom Build Step"

Can anyone tell me what the problem is and how I can solve it?

Thanks in advance for your time.

~Ray
0 Kudos
Message 1 of 4
(3,491 Views)
Ray;

For some strange reason sometimes the custom step cause a lot of troubles when implemented in VC++. I created a small VI just to implement the custom step. You can downloaded from here:

http://www.visecurity.com/tools.shtml

Look for the VI called CIN Custom Step

I hope this helps.

Regards;
Enrique
www.vartortech.com
Message 2 of 4
(3,491 Views)
Thanks, Enrique.

Your VI solved my problem. :

~Ray
0 Kudos
Message 3 of 4
(3,491 Views)
You can do it all from VC.Go to CustomBuild property page

In the "Command Line" box type
"C:\Program Files\National Instruments\LabVIEW 7.1\cintools\lvsbutil" "$(TargetName)" -d "$(ProjectDir)$(OutDir)"

and in the "Outputs"
$(OutDir)$(TargetName).lsb

A Rafiq
Message 4 of 4
(3,491 Views)