Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 10/26/2017 in all areas

  1. QUOTE(PeterB @ Jul 4 2007, 07:50 AM) You don't! LabVIEW can NOT do anything with lib and obj files. That is for C compilers only and even then you have to have lib and obj files that are compatible for your C compiler, eg. meaning they should have been created by the C compiler you want to use them with too. You can't create a LabVIEW DLL and hope that LabVIEW will link to your lib file magically. A LabVIEW DLL is really a LabVIEW LLB with very small exported C wrappers around those VIs inside the LLB. There is no way you can influence the C wrapper generation made through the LabWindows CVI runtime engine to somehow include your lib file and even if you could it wouldn't help either, as the wrapper code generation does not know how to link to other lib files than what is necessary to wrap the VIs such that they can be called as a DLL export function. If this lib file is only an import library to the actual functionallity in a DLL then you could instead link to that DLL through the Call Library Node. Otherwise there will be no way around creating some C code to be put in a DLL and that can be called by LabVIEW that links with your lib file. In that case you need to create a DLL in Visual C, that you can call from LabVIEW and you want to include that lib file into that Visual C DLL project. I hope I didn't confuse more than help but it's simple! If the actual functionality of your lib file is not located in a DLL file for which you have documentation and the API interface, then you WILL have to create a C DLL first. Ok I reread the first post once more and I see that you want to create a DLL to be integrated in VisSim and that the DLL needs to link to vissim32.lib. This can't work without Visual C. In fact their statement that any environment that can create DLLs should work is mostly wrong. Besides Visual C there is only LabWindows CVI and proabably Borland C that can directly link with vissim32.lib. lib and obj files are binary files that can come in many flavors and Visual C will generate and require so called COFF format, while Borland will generate and prefer OMF format. LabWindows CVI used to support both formats for generation and linking but you needed to decide whith format you wanted during installation. LabVIEW can not generate obj files. What it can and does do is generating Visual C compatible import libraries for the LabVIEW generated DLLs. So what you can do if you need to generate Vissim callable DLLs that incorporate LabVIEW code is to generate the LabVIEW DLL and then generate another C DLL that also includes the lib file for vissim32.lib and your LabVIEW DLL import lib file. Rolf Kalbermatter
    1 point
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.