- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
CyAPI.lib has unresolved external symbols:
1>cydesc.obj : error LNK2019: unresolved external symbol "public: void __cdecl CCyUSBDevice::Close(void)" (?Close@CCyUSBDevice@@QEAAXXZ) in function main
1>cydesc.obj : error LNK2019: unresolved external symbol "public: void __cdecl CCyUSBDevice::GetDeviceDescriptor(struct _USB_DEVICE_DESCRIPTOR *)" (?GetDeviceDescriptor@CCyUSBDevice@@QEAAXPEAU_USB_DEVICE_DESCRIPTOR@@@Z) in function main
1>cydesc.obj : error LNK2019: unresolved external symbol "public: bool __cdecl CCyUSBDevice:: Open(unsigned char)" (?Open@CCyUSBDevice@@QEAA_NE@Z) in function main
1>cydesc.obj : error LNK2019: unresolved external symbol "public: unsigned char __cdecl CCyUSBDevice:: DeviceCount(void)" (?DeviceCount@CCyUSBDevice@@QEAAEXZ) in function main
1>cydesc.obj : error LNK2019: unresolved external symbol "public: __cdecl CCyUSBDevice::CCyUSBDevice(void *,struct _GUID,int)" (??0CCyUSBDevice@@QEAA@PEAXU_GUID@@H@Z) in function main
This happens only when building for x64 while building for Win32 platform solution everything is OK!!!
Is there something to change in the project properties?
Does someone know how to resolve this problem?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am compiling for a 64 bit OS using Visual Studio 2005. I am linking against the CyAPI.lib included in Cypress Suite 3.4.1.
Is there another compiler flag I should be using?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
In the 3.4.1 release notes it states:
The new featuers offered in CySuite 3.4 are
2. 64 bit support for cyapi.lib (C++ based API Library)
What does this refer to? Using my original library (I am not sure of the version), the compilation failed saying "CyAPI.lib is an x86 library". When I switched to the new 3.4.1 CyAPI.lib, it no longer complained about being x86 i.e. the compiler thought it was x64, but it had missing symbols. I am not sure how this is possible as I thought a library could only be 32 bit or 64 bit.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Other things I would check are, make sure that the linker is actually going after the correct lib file. I would rename it and try to build again and make sure that it fails with something like library not found.
Also, you could use Dependency Walker (google it) to peek into the lib and see what symbols are there and if they're absent, missing any name mangling, etc.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Does anyone know if latest CyAPI.dll (3.4.1 with 64 bit support) is compatible with c++ or only with c# ?
All examples in documentatiosn seem to be c#.
I do not manage to get it building with c++ in VS 2008.
If you have any examples for c++ please attach.
Thanks
aa
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am still waiting on a x64 version of the CyApi.lib, which should be released by the end of this month.
What errors are you getting?
What are you linking against?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have created the Win Forms application in VS2008 , added DLL as a reference , but I can't create any objects it keeps giving build errors:
e.g. for this line
USBDeviceList usbDevices = new USBDeviceList(CyConst.DEVICES_CYUSB);
I get :
1>.\try_wf.cpp(18) : warning C4832: token '.' is illegal after UDT 'CyUSB::CyConst'
1> c:\program files\cypress\cypress suite usb 3.4.1\cyusb.net\lib\cyusb.dll : see declaration of 'CyUSB::CyConst'
1>.\try_wf.cpp(18) : error C2750: 'CyUSB::USBDeviceList' : cannot use 'new' on the reference type; use 'gcnew' instead
1>.\try_wf.cpp(18) : error C2664: 'CyUSB::USBDeviceList::USBDeviceList(unsigned char)' : cannot convert parameter 1 from 'CyUSB::USBDeviceList *' to 'unsigned char'
thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
aa, it looks like you're trying to used managed extensions for C++. I'm sure it's possible, because .NET languages are supposed to be interchangeable, but personally I think managed C++ is just awful to read, so I can't say I could even write an example.
The first error (warning?!) looks like it's upset that you're using the . operator after CyConst. Try creating a local variable of the same type as CyConst.DEVICES_CYUSB and putting that in there, then passing that local variable to the constructor instead.
It also looks like it's upset about you using "new", and it wants you to use "gcnew" instead. Refer back to "Managed C++ is just awful to read" for more info.
The final error looks like it's just confused about what a CyConst.DEVICES_CYUSB. I'm pretty sure that constant is not a pointer to a USBDeviceList....
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I also need a 64-bit version of CyAPI.dll that is compatible with c++. I'm not using c#. Is this available yet?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Guys,
The 64-bit version of CyAPI.lib is available through SuiteUSB.
oingoboingo,
Are you talking about CyAPI.lib or CyUSB.dll??
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I checked the latest SuiteUSB but the CyAPI.lib and example are still used for VC6.0. I am looking forward to CyAPI.lib for VS2005 VC++ urgently. ( Actually I have been looking for it for a long long time )
CyUBS.dll is only for Win Forms App, I don't use Win Forms. ................................Who can hlep me, please?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi, i've a problem with creating a new project.
i've installed SuteUSB 3.4.2, then i've created a new project in VS 2008 (i'm using Windows XP 32 bit), i've followed the 7 points of the instructions, but i've some problems:
1) after the line #pragma, i've write the following lines:
#include <wtypes.h>
#include <dbt.h>
but when i try to build the solution, this error occurs:
"Fatal Error C1083: cannot include file<wtypes.h> : no file or directory"
2) i've tried to comment these two lines, and build.
now i've 240 errors in file CyAPI.h : it's because i cannot include the two previous file??
thanks!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alecha,
The file you are referring to "wtypes.h" is the part of windows SDK.Check if you have this file in "C:\Program Files\Microsoft SDKs\Windows\v6.0A\include\wtypes.h" this location. If not install windows sdk.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
hi! thanks for the reply, i've resolve my problem using Windows 7, maybe the Windows SDK is already installed!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
To wcassan
I got the same building error regarding "DeviceCount" and "CreateHandle" using CyAPI.lib with winx64. For me it was due to deleting "Setupapi.lib" from linker->input ->AdditionalDependencies. It may seems obvious but in case you made the same mistake as me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
win7 64bit, must add depend object:Setupapi.lib; CyAPI.lib (x64 )
i compile in the vs2010, pass!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Guys
Thanks for sharing the information on the thread.