07-16-2008 12:44 PM
07-17-2008 03:19 AM
07-17-2008 07:42 AM
Usually when I create an instrument driver function panel, a project only needs to load the instrument, even if the function panel is implemented as a .c and .h -- the project will compile just fine without adding the .c or .h to the project.
This instrument driver I am creating requires a 3rd party library that is an import library to a DLL. The DLL contains the low-level functions that communicate with the instrument. My function panel wraps these low-level functions.
So my function panel looks like this: myInst.c, myInst.h, myInst.fp where myInst.h includes the 3rd party driver.h that provides the function prototypes for the 3rd party driver.lib.
When my instrument is loaded into a developer project, the functions in the 3rd party library can't be found by the linker even if the library is added to the project.
Tried creating my own static library for my function panel -- received an error saying that the 3rd party library can't be included in the static library I want to build. So, no luck there.
I did discover two work-arounds but I don't like either of them:
1. Add the .c file for my function panel to the developer project and add the 3rd party library to the developer project.
2. Add the 3rd party library to the developer project then under the Build menu I choose Target Settings, click Add Files to Executable, and place a check mark beside the 3rd party library file. However this seems rather complex and non-intuitive (it's like I am adding the file twice)
In either case, there are additional, unexpected steps to get my instrument working with the project. Developers expect to load the instrument and go.
Is it possible to build an instrument driver, using a 3rd party library, that can simply be loaded as an instrument with no need for additional steps?
Thanks, Mike.
07-17-2008 08:07 AM
07-17-2008 09:31 AM