Unresolved externals linking usbtc08 (VS2013 C++ .NET x64)

Post your .Net discussions here
Post Reply
francois_bouvet
Newbie
Posts: 0
Joined: Wed Dec 14, 2016 8:51 am

Unresolved externals linking usbtc08 (VS2013 C++ .NET x64)

Post by francois_bouvet »

Hello Martyn,
Do you have some examples in how to wrap the usbTC08 C code with C++ .NET code in Visual Studio (mine is VS2013) ?
When I open and compile the console examples given by the SDK either in C or in C#, it works well (using x64 to compile).
But when I try to interface with my code in C++ .NET (managed), I fail.

I've included "usbtc08.h", and when I try to use for example the simple usb_tc08_open_unit() method, I get an unresolved external linking error, whatever I define or not DYNLINK in usbtc08.h.
I've correctly added the include path and library path in the properties of my project in order for VS to find the usbtc08.h, usbtc08.lib and usbtc08.dll files.
It is the same if I place the files in the project source code directory.

I've understood how works the supplied wrapper given for C#, but unfortunately the application where I need to use your product was coded in VS2013 C++ .NET, and is a Windows Forms GUI application.
Can you help me with an example of Wrapper in C++ .NET ?

Another very strange thing is that when I tried to open usbtc08.dll with DependencyWalker (x64 as well as x86 versions), the DLL opens in both cases with the following warnings:
Warning: At least one delay-load dependency module was not found.
Warning: At least one module has an unresolved import due to a missing export function in a delay-load dependent module.
Since the opened DLL is supposed to be x64, I've got too the following error message if I open it with the 32bits version of DependencyWalker:
Error: At least one module has an unresolved import due to a missing export function in an implicitly dependent module.
Error: Modules with different CPU types were found.

Thank you in advance.

Best Regards.
François BOUVET
francois.bouvet@sonaxis.com

Post Reply