Post your C and C++ discussions here
- Posts: 0
- Joined: Thu Jun 18, 2015 12:28 pm
I'm working on a project which involves using a DrDAQ data logger connected to a Win 7 PC to count voltage spikes over long periods of time (possibly weeks). I have chosen to use C to keep it simple so there would be no need to have Matlab or Labview on the computer. I downloaded the appropriate files "usbDrDaqApi.h", "usbdrdaq.lib" to build the project. As the first step I'd like to simply connect to DrDAQ.
I'm using Dev-C++ to compile the above code which gives me the linking error : " undefined reference to `_imp__UsbDrDaqOpenUnit@4' ".
Code: Select all
printf ("\nPicoLog test 01\nOpening device...\n");
status = UsbDrDaqOpenUnit(&g_handle);
I must have made a very basic mistake if even this simple code fails to compile. Thanks for your suggestions in advance.
- PICO STAFF
- Posts: 2855
- Joined: Tue May 31, 2011 3:43 pm
- Location: St. Neots, Cambridgeshire
It sounds like the compiler cannot find the lib file. Have you added the .lib file to your project?
It's also good practise to call the UsbDrDaqCloseUnit function before exiting your program in order for the driver to release the connection to the device.
Software Dev. Engineer