11-12-2009 12:11 PM
I have a labview shared library created in labview 8.2.1. This labview dll contains a three functions, which in turn have a number of mathscript nodes embeded inside them. The reason for compiling them into a shared library dll is because i want to call this dll from labview 7.0. I have a working test program created in both labview 8.2.1 and labview 7.0.
The problem i have got is that these executables both run ok on my development machine but when i move them to another machine with only the labview runtimes installed (7.0 and 8.2.1) the dll function calls fail to do anything. No errors appear so it is very difficult to track down where the problem is occuring. I have two different dlls being called within the example program. The first dll just handles file acceess and doesn't have any mathscript bits in it but the second, which is the one i am actually interested in, has the mathscript nodes in. Looking at the memory usage i can see that it is doing the file access dll call but not doing the mathscript one.
I installed an evaluation copy of labview 8.2.1 on this laptop with only the runtime on, ran the program and it works fine. I think it has to be something not linked in to the dll but i cannot see anything in the options to add anything else. I do have the mathscript tick box selected in the build option.
I know there are a number of functions that don't run with just the runtime but i cannot see any in there that my program uses.
Does anyone have any advice?
Solved! Go to Solution.
11-13-2009 06:12 AM
I have continued doing some tests and the problem arrises as soon as the dll includes any functions with a mathscript node it. I create a test function that i added to the dll which prints out a debug message. Again, this works fine on my development system but not on the runtime only system. I created a second dll that has this function plus one function with mathscript in. When i link to this dll the function again fails to print out this log messgae. If i then remove the function with the mathscript in then things work correctly on the runtime only system. It has to be a linking problem with the mathscript stuff but for the life of me i cannot see where.
Anyone else had this problem?
11-18-2009 03:23 AM
11-19-2009 10:57 AM
Ok, i have done some more digging. I have tried upgrading to 2009 and have come to the concusion that i don't believe it is a labview version problem. I have found problems with the following mathscript functions when they are embedded inside the shared library.
mean
fft
linspace
If i comment these lines out within the mathscript nodes, and then recompile the shared library, then it runs fine on a runtime only system. As soon as i put these functions back in the dll will not operate correctly. I have 5 or 6 different functions within this shared library. Even though i am not calling the function with the problematic (mean, fft, linspace) functions in the dll will fail to run any of the functions. The strange thing is that it runs fine on the development system.
Both my test program and shared dll are both running in Labview 2009 now.
11-22-2009 06:26 AM