1 2 Previous Next 18 Replies Latest reply on May 8, 2013 11:32 PM by nikhil.naik

    CyAPI.lib - VS2008 x64 Building Error

    william.cassan
              I'm trying to build the example program cydesc.c (Cypress Suite USB 3.4.1) in a 64bit OS (Windows 7) for a 64bit OS (Platform solution x64 and /MACHINE:X64).   
      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?   
        • 1. Re: CyAPI.lib - VS2008 x64 Building Error
          anand.srinivasan.asokan
                  kind of confusing error... I'll see if i'm able to replicate the issue... i'll update you on whatever i'm able to find...   
          • 2. Re: CyAPI.lib - VS2008 x64 Building Error
            michael.marshall
                    I am running into this problem as well.   
               
            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?   
            • 3. Re: CyAPI.lib - VS2008 x64 Building Error
              anand.srinivasan.asokan
                      The currently available cyapi.lib is a x32 version... it will work in wow64 mode i.e. compilation mode to make x32 program run in x64 platform... i don't think you can change anything to make it work in compilation for x64... i heard the release of a x64 version is in plan...   
              • 4. Re: CyAPI.lib - VS2008 x64 Building Error
                michael.marshall
                        Is there a release time on an x64 CyAPI.lib?   
                   
                   
                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.   
                • 5. Re: CyAPI.lib - VS2008 x64 Building Error
                  andrew.sobotka
                          I've had trouble with 64-bit support before. You can force Windows On Windows emulation (WOW) by going to the project's properties and, on the build tab, look for "Platform Target". AnyCPU builds 32-bit apps for 32-bit systems and 64-bit apps for 64-bit systems, while x86 will build 32-bit apps for both 32-bit and 64-bit systems.   
                     
                  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.   
                  • 6. Re: CyAPI.lib - VS2008 x64 Building Error
                    alla.akselrod
                            Hi,   
                       
                    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   
                    • 7. Re: CyAPI.lib - VS2008 x64 Building Error
                      michael.marshall
                              It is compatible with C++. I am able to build a 32 bit executable using C++ VS 2005.   
                         
                      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?   
                         
                      • 8. Re: CyAPI.lib - VS2008 x64 Building Error
                        alla.akselrod
                                Hi,   
                           
                        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   
                        • 9. Re: CyAPI.lib - VS2008 x64 Building Error
                          andrew.sobotka
                                  mimarsh, the only thing that would stop you from using the Cypress library on x64 is the driver, and that's already 64-bit compatible. You ought to be able to force the compiler to target 32-bit platforms always (like the above post I made about changing the target from ANYCPU to x86)   
                             
                          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....   
                          • 10. Re: CyAPI.lib - VS2008 x64 Building Error
                            michael.deluca

                            I also need a 64-bit version of CyAPI.dll that is compatible with c++.  I'm not using c#.  Is this available yet?

                            • 11. Re: CyAPI.lib - VS2008 x64 Building Error
                              anand.srinivasan.asokan

                              Hi Guys,

                                 

                              The 64-bit version of CyAPI.lib is available through SuiteUSB.

                                 

                               

                                 

                              oingoboingo,

                                 

                              Are you talking about CyAPI.lib or CyUSB.dll??

                              • 12. Re: CyAPI.lib - VS2008 x64 Building Error
                                brian.lin

                                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?

                                • 13. Re: CyAPI.lib - VS2008 x64 Building Error
                                  alessio.cavaleri

                                   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!

                                     
                                      
                                     
                                     

                                      

                                     
                                      
                                            
                                     
                                  • 14. Re: CyAPI.lib - VS2008 x64 Building Error
                                    shubham.trivedi

                                    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.

                                    1 2 Previous Next