07-25-2013 09:50 AM
Hello.
I have a project that was generated from the Import Shared Library Wizard. The C++ project (which I did not write) has dependencies (OpenCV dll's). When I try to run one of the VI's I get an error that says "opencv_core245d.dll is missing from your computer. Try reinstalling ... "
So, I do have that DLL. Where do I need to put it so that LabVIEW knows it exists? I tried Windows/System32 to no avail.
Solved! Go to Solution.
07-25-2013 10:56 AM
Even when I include the specific folder that has the DLL in it, it still can't find it.
07-25-2013 11:08 AM - edited 07-25-2013 11:09 AM
Is it your C++ program who is needing this dll or is it LabVIEW that is directly calling this dll?
If it is this C++ program that is using this dll, then you should ask how ever has made that program, where the opencv dll should be stored.
07-25-2013 11:26 AM
Putting it in the same directory as the C++ developer had it in was ineffective.
07-25-2013 11:30 AM
That was not what I was asking about.
If it is the C++ porgam that needs the dll, then ask the developer how the C++ program is calling this dll.
Does he use a relative path, or and absolute path ?
07-25-2013 01:44 PM - edited 07-25-2013 01:49 PM
The "d" before the ".dll" in "opencv_core245d.dll" leads me to believe that it was compiled for debugging.
Try building this library for release (aka "opencv_core245.dll").
Or, for debugging builds in general, check the linker settings to ensure you include the dll:
Linker -> Input -> Additional Dependencies...
Then add:
opencv_core245d.dll;
Lastly don't forget:
Linker -> General ... Set 'Use Library Dependency Inputs' to 'Yes'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EDIT:
Another thing to try is adding "C:\OpenCV2.0\bin
" to your environment paths for windows 7 and restarting your computer.
*Note: This path needs to lead to the .dll's folder. If you copied the OpenCV dll's elsewhere, then link to that path.
07-25-2013 03:55 PM
Yes, for debugging.
Do you have any reason to believe that building it as a release would be more effective?
I tried adding the path but that didn't do it.
I have asked the C++ developer about the Use Library Dependency Inputs.
Thanks for the help thus far and I will let you know of updates.
07-25-2013 04:09 PM
I checked the Import Shared Library Report, got this:
VI Not Executable
The VI is not executable because of one of the following reasons:
1. The shared library or a dependent file is not installed. To make the VI executable, you must install the shared library and all support files on the computer on which you run the VI.
2. A required custom control might be empty or cannot be found. To make the VI executable, update the custom control manually.
3. The VI contains a parameter with an unsupported data type. To make the VI executable, you must replace the empty cluster that the wizard generates with a control or indicator that uses supported data types.
fn Labview DLL Test.vi
test Echo.vi
test Open CV.vi
07-25-2013 04:54 PM
So I was able to get his functions to run... But I think I found a LabView glitch.
After the library was built, I went into the Call Library Function Node and clicked on the arrow for "Function name". Even though it was already set correctly, by choosing the Function name that associates with the VI (clicking on the name that was already highlighted...) the VI is suddenly executable.
Any feedback on why this happened would be great.
07-25-2013 08:02 PM - edited 07-25-2013 08:05 PM
What did you do to get the DLL working? -- In case someone encounters a similar issue.
Also, I cant test this right now cause I am on a Mac, but if I recall you need to set the DLL and a function before the Call Library Function Node will be runnable. So perhaps it selected the first (or only?) function name by default after your entered the DLL into the Call Library Function Node, but required you to confirm a function before proceeding. Often you need to change the parameters or return value anyhow, so perhaps that's also required (viewing the tab and verifying the default Voids are okay).
Is this an issue at all? Or were you just confused by the way it happened?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
EDIT:
As long as you can follow steps similar to this guide below, you should be in business. As to why it wasn't runnable before completing all these steps, that I am unable to answer since I have only used them a few times:
https://decibel.ni.com/content/docs/DOC-9069