USB PT104 integration and UsbPT104.lib

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

USB PT104 integration and UsbPT104.lib

Post by pmrfox71 »

Hello,
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!

Chris
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 »

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

There is no alternative to doing this.

Post Reply