Cypress Perform

Home > Design Support > Cypress Developer CommunityTM > Cypress Forums > USB Controllers > C++ DLL for FX3 cannot link

Bookmark and Share
Cypress Developer CommunityTM
Forums | Videos | Blogs | Training | Rewards Program | Community Components



C++ DLL for FX3 cannot link
Moderator:
RSKV

Post Reply
Follow this topic



C++ DLL for FX3 cannot link

dreitz posted on 19 Apr 2012 11:43 AM PST
Top Contributor
74 Forum Posts

I'm building a C++ DLL for our FX3 board.  When I try to build the code, I get the following link errors.  How do I correct this?

 

1>CyAPI.lib(CyAPI.obj) : error LNK2019: unresolved external symbol __imp__SetupDiDestroyDeviceInfoList@4 referenced in function "public: unsigned char __thiscall CCyUSBDevice::DeviceCount(void)" (?DeviceCount@CCyUSBDevice@@QAEEXZ)

1>CyAPI.lib(CyAPI.obj) : error LNK2019: unresolved external symbol __imp__SetupDiEnumDeviceInterfaces@20 referenced in function "public: unsigned char __thiscall CCyUSBDevice::DeviceCount(void)" (?DeviceCount@CCyUSBDevice@@QAEEXZ)

1>CyAPI.lib(CyAPI.obj) : error LNK2019: unresolved external symbol __imp__SetupDiGetClassDevsA@16 referenced in function "public: unsigned char __thiscall CCyUSBDevice::DeviceCount(void)" (?DeviceCount@CCyUSBDevice@@QAEEXZ)

1>CyAPI.lib(CyAPI.obj) : error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceInterfaceDetailA@24 referenced in function "public: bool __thiscall CCyUSBDevice::CreateHandle(unsigned char)" (?CreateHandle@CCyUSBDevice@@QAE_NE@Z)




Re: C++ DLL for FX3 cannot link

capiman posted on 19 Apr 2012 01:51 PM PST
Senior Member
18 Forum Posts

I think you must add "Setupapi.lib" to your list of libraries.



Re: C++ DLL for FX3 cannot link

didier.martiny posted on 04 May 2012 01:40 PM PST

1 Forum Post

 Same error here:

Error 5 error LNK2019: unresolved external symbol __imp__SetupDiGetDeviceInterfaceDetailA@24 referenced in function "public: bool __thiscall CCyUSBDevice::CreateHandle(unsigned char)" (?CreateHandle@CCyUSBDevice@@QAE_NE@Z) P:\Colibiri - USB 3.0 Debug\TestSW_new_driver\CyAPI.lib(CyAPI.obj)

Error 4 error LNK2019: unresolved external symbol __imp__SetupDiGetClassDevsA@16 referenced in function "public: unsigned char __thiscall CCyUSBDevice::DeviceCount(void)" (?DeviceCount@CCyUSBDevice@@QAEEXZ) P:\Colibiri - USB 3.0 Debug\TestSW_new_driver\CyAPI.lib(CyAPI.obj)

Error 3 error LNK2019: unresolved external symbol __imp__SetupDiEnumDeviceInterfaces@20 referenced in function "public: unsigned char __thiscall CCyUSBDevice::DeviceCount(void)" (?DeviceCount@CCyUSBDevice@@QAEEXZ) P:\Colibiri - USB 3.0 Debug\TestSW_new_driver\CyAPI.lib(CyAPI.obj)

Error 2 error LNK2019: unresolved external symbol __imp__SetupDiDestroyDeviceInfoList@4 referenced in function "public: unsigned char __thiscall CCyUSBDevice::DeviceCount(void)" (?DeviceCount@CCyUSBDevice@@QAEEXZ) P:\Colibiri - USB 3.0 Debug\TestSW_new_driver\CyAPI.lib(CyAPI.obj)

Error 6 error LNK1120: 4 unresolved externals P:\Colibiri - USB 3.0 Debug\TestSW_new_driver\Debug\TestSW.exe

 
How can I work around the problem. This is a blocking problem...
 
 



Re: C++ DLL for FX3 cannot link

capiman posted on 05 May 2012 10:27 PM PST
Senior Member
18 Forum Posts

Same answer: I think you must add "Setupapi.lib" to your list of libraries.



Re: C++ DLL for FX3 cannot link

aasi posted on 07 May 2012 03:32 AM PST
Cypress Employee
1073 Forum Posts

Which version of Visual Studio are you using?

Have you tried compiling the examples that come as part of SuiteUSB and tried compiling them. Just make sure your Visual Studio environment is configured properly.

Regards,

Anand






ALL CONTENT AND MATERIALS ON THIS SITE ARE PROVIDED "AS IS". CYPRESS SEMICONDUCTOR AND ITS RESPECTIVE SUPPLIERS MAKE NO REPRESENTATIONS ABOUT THE SUITABILITY OF THESE MATERIALS FOR ANY PURPOSE AND DISCLAIM ALL WARRANTIES AND CONDITIONS WITH REGARD TO THESE MATERIALS, INCLUDING BUT NOT LIMITED TO, ALL IMPLIED WARRANTIES AND CONDITIONS OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT OF ANY THIRD PARTY INTELLECTUAL PROPERTY RIGHT. NO LICENSE, EITHER EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, IS GRANTED BY CYPRESS SEMICONDUCTOR. USE OF THE INFORMATION ON THIS SITE MAY REQUIRE A LICENSE FROM A THIRD PARTY, OR A LICENSE FROM CYPRESS SEMICONDUCTOR.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms and Conditions of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms and Conditions of this site. Cypress Semiconductor and its suppliers reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.