USB PT104 integration and UsbPT104.lib

Post any questions you may have about our current range of USB data loggers
Post Reply
Posts: 0
Joined: Wed Jan 27, 2010 10:37 am

USB PT104 integration and UsbPT104.lib

Post by pmrfox71 » Thu Apr 21, 2011 7:35 am

we have integrated USB PT-104 driver in our measurement software.
We followed the instructions contained in the SDK file USBPT104con.c, which say:
* To build this application
* Windows: set up a project for a 32-bit console mode application
* add this file to the project
* add UsbPT104.lib to the project (Microsoft C only)
* add UsbPT104Api.h and picoStatus.h to the project
* then build the project
Our project is written in C++ and compiled with Microsoft Visual C 6.0,
We followed the above instructions things work ok.

Now we have a new problem: we need to use your dll WITHOUT including your lib file in the project. We just would like to
- include any necessary header file
- load the dll via LoadLibrary("USBPT104.dlll")
- use GetProcAddress(...) for getting the methods which we intend to use.

The problem is that if we do not add add UsbPT104.lib to the project then we get the following error:
error LNK2001: unresolved external symbol _UsbPt104OpenUnitViaIp@12

Do you have any suggestions in order to avoid this? Is there any modified header file that we could use in order not to add the lib file to the project? Please let me know if you need any further details.

Thank you very much for any help!

Site Admin
Site Admin
Posts: 169
Joined: Tue Aug 17, 2010 9:00 am
Location: St. Neots

Re: USB PT104 integration and UsbPT104.lib

Post by Chris » Wed Apr 27, 2011 2:05 pm

To use the API's, you need to link with the lib file.

There is no alternative to doing this.

Post Reply