06-10-2009 08:33 AM
Hi
I have to use an acquisition card : the 'ACPI 3120' ADDI DATA
Addi Data provides samples with this card, but they are contained in 3 files : one C source file, one C header file, and a .lib file
I have to create a dll to use the acquisition functions with thi card
But when I want to compile the dll, CVI says :
ERROR: Exporting a variable or function defined in an import Iibrary s not supported. Unable b export ‘j_APC13120_Initcompiler@4’. Aborting DLL Creation,
In fact, this function 'ACPI3120_InitCompiler' is in the lib file
Is there a way to create a dll using a lib file ?
Thank you for your answers
06-10-2009 08:50 AM
If the Addi Data lib file is an import library file, then there must already be an associated dll file as well. Presumably your code will extend the functionality of their existing library, so one quick way to resolve your difficulties is to add wrapper functions of your own, which simply call the supplied library ones. Then just export the wrappers along with your other custom code in the usual way.
JR
06-10-2009 09:31 AM
Thank You for your answer Jr_2005. I found this dll shipped with the card
I'm now trying to load this dll in the dll I'm trying to create.
Is it possible to load a dll inside a dll ?
06-10-2009 10:07 AM
Yes you can load a dll from a dll.
Either explicitly (dynamically) with LoadLibraryEx function or implicitly (statically, at program start) simply by binding the export library of the second dll to the first dll.
06-10-2009 11:02 AM
Thank you for your answers ... it works
🙂