10-28-2009 05:45 AM
Hi all
i made a program in labview and the made its DLL using application builder.Now when i want to use the DLL in C program,my program is compling but while building it the error comming is Unresolved external '_SETINS' referenced from D:\dhiraj\labread.OBJ. SETINS is the function name i am calling.
Moreover i also want to know that is there someway to provide character string output from the DLL made in Labview.
Also if the parameter which i am passing as arguments to the DLL and then in DLL i am changing the argument value,then when i come back after the DLL call ,what will be the value of the arguments??.Will it change or remain the same.
Thanks in Advance for early reply.....
Dhiraj Kumar
10-30-2009 01:00 AM
Hey Why is someone not attending to my problem,maybe i feel labview DLL's can't be used in any language.Its not being recognized by the C++.
Oky let me make it simple.
Let us make a DLL with C=SUM(A,B) where (C=A+B)
now how to use the DLL in any orther language and use the function SUM.
Hoping This time someone replies
Thanks in Advance
Dhiraj Kumar
10-30-2009 03:27 AM
10-30-2009 03:47 AM
Hi,
"Moreover i also want to know that is there someway to provide character string output from the DLL made in Labview."
while using string output from dll create a string array and pass to dll, while building dll (with string output) an extra parameter named len will be created input string array size to this parameter
Assumptha
10-30-2009 03:56 AM
10-30-2009 04:24 AM
Ok Partha! but copy paste is convinent for me!
regarding calling labview buld dll from following link will also be help full
http://zone.ni.com/devzone/cda/tut/p/id/3927
Regards
Assumptha
10-30-2009 07:30 AM - edited 10-30-2009 07:32 AM
dhiraj03416 wrote:Hey Why is someone not attending to my problem,maybe i feel labview DLL's can't be used in any language.Its not being recognized by the C++.
Oky let me make it simple.
Let us make a DLL with C=SUM(A,B) where (C=A+B)
now how to use the DLL in any orther language and use the function SUM.
Hoping This time someone replies
Thanks in Advance
Dhiraj Kumar
When you build your DLL in LabVIEW, LabVIEW also creates a .h file and a .lib file. The H file you obviously have figured out already needs to be #included in your source file where you want to call the function. This allows the compiler to create code to call that function correctly. However the linker has no idea where to get that function from and that is where the .lib file comes into the play. You need to add that lib file to your project too, so the linker can resolve the function call properly.
A little bit of C programming basics also includes some basic knowledge about linking the program together and that you need to have all functions available in either an object or library file, somewhere
And last but not least the lib file only contains the code to look for the function in the according DLL file, so in order to run your application afterwards you need to make sure to copy (and distribute) the DLL into your executable directory.
11-02-2009 11:06 PM
some one can help me with the code in borland C++ 5.1
11-03-2009 12:32 AM - edited 11-03-2009 12:41 AM
dhiraj03416 wrote:some one can help me with the code in borland C++ 5.1
Borland C or Visual C shouldn't matter much. Only the configuration location and names will be a little different. That happens even between different versions of Visual C.
But what is your problem? Probably the linking of the LabVIEW provided *.lib file? Unfortunately Borland uses OMF format object libraries while Visual C uses the COFF format. And the standard LabVIEW link libraries that you receive are of course COFF format. There are also OMF format libraries that you can regognize from the *.sym.lib ending, but they are for the now obsolete Symantec C compiler. But while both Symantex C and Borland C use OMF, object library formats are not always the same eventhough they use the same basic format type. I have several times recommeneded here to try to use the Symantec libraries for use with the Borland C compiler with the warning that it might NOT work. And never received any feedback positive or negative. That is the general type of feedback one receives here on possible solutions hint, hint!
IF it doesn't work you have two options: Change the compiler or load all the functions you need dynamically! (LoadLibrary(), GetProcAddress() ).
11-03-2009 01:18 AM
Thanks dear
Yes that's the problem i am facing,
Ok i am loading the dll's dynamically ,then also i am not getting the results.when i give the Message Box ,then its still holding.
Using dynamic loading method do i have to include any file of labview???
Thanks alot for attending to my problem.