LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Why won't lvsbutil create lsb from Visual Studio .NET dll?

I am attempting to create the .lsb file for a C routine I am running from Labview. My problem is I can create the dll but when I use the Labview utility 'lvsbutil' from Visual Studio .NET I get an unknown error from the custom build step. I then ran the utility from the command line and I don't get an error but I also don't get my .lsb file. I am using Labview 7.0 Professional and Visual Studio .NET 2003.
I have tried this at home on evaluation version of Labview 7.0 using Visual Studio 6.0 and it works from the command line. As a result I'm not sure my problem is Labview, Visual Studio .NET or an incompatibility between the two.
Any help is greatly appreciated.
0 Kudos
Message 1 of 13
(4,539 Views)
I noticed you have to use the following custom build setting :

Custom build step -> General -> Command line :

directory of cintools\lvsbutil "$(TargetName)" -d "$(SolutionDir)$(OutDir)"

Custom build step -> General -> Outputs :

$(OutDir)$(TargetName).lsb

And did you set directory of cintools\lvsbmain.def in the Linker -> Input -> Module Definition File field ?

Message Edited by Raistlin on 05-07-2005 07:58 AM

0 Kudos
Message 2 of 13
(4,532 Views)
When I started having this problem I went through the Using Exernal Code in Labview step-by-step and including the things you suggested; but alas, to no avail.
0 Kudos
Message 3 of 13
(4,516 Views)
Also double check that you aren't building managed C++ by mistake. Go to Project Properties->General->Use Managed Extensions should be "No".
0 Kudos
Message 4 of 13
(4,516 Views)
Still the same result.
0 Kudos
Message 5 of 13
(4,513 Views)
Can you zip up and post your project and code?

If it is large, can you create a simple example that has the problem?
0 Kudos
Message 6 of 13
(4,508 Views)
I have attached the VC project in a .zip file. I have changed settings from the original in 'Using Extenal Code', $WkspDir is not valid build command with .NET. I found this a while ago looking thru the log file. This is very simple code while I attempt to figure out what is wrong so don't laugh too hard.
Thanks for the help.
0 Kudos
Message 7 of 13
(4,503 Views)
Ah. I acknowledge that the lvsbutil could use a bit more in the way of error messages. Anyway, change the arguments in your custom step to

c:\cintools\lvsbutil "$(TargetName)" -d "$(ProjectDir)$(OutDir)"
0 Kudos
Message 8 of 13
(4,492 Views)
Worked like a champ. I really appreciate the help.
0 Kudos
Message 9 of 13
(4,487 Views)
Does anyone know if the solution here will work with Labview 7.1 and Visual C++ 2005? I think that I've done all of the things listed here (and with Platform SDK, to allow me to build DLLs, as described here http://msdn.microsoft.com/vstudio/express/visualc/usingpsdk/), but I'm still getting that same

Project : error PRJ0019: A tool returned an error code from "Performing Custom Build Step"

 

I can definately give more detail, but I'm not sure what is important at the moment. I'm just trying the simple example programs in the LabView manual

 

Thanks!

 

Tim

0 Kudos
Message 10 of 13
(4,217 Views)