Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

USB superspeed peripherals Forum Discussions

PeSh_4780406
Level 1
Level 1

Was working on some download code and hit a linker error:

somefile.cpp:829: undefined reference to `cyusb_download_fx3(libusb_device_handle*, char*)'

collect2: error: ld returned 1 exit status

after some debug found in the libcyusb.cpp the function has this prototype:

int

cyusb_download_fx3 (

cyusb_handle *h,

        const char *filename)

but in the cyusb.h file in the include directory the prototype is:

extern int cyusb_download_fx3(cyusb_handle *h, char *filename);

if I change the libcyusb.cpp from "const char *filename)" to "char *filename)" and rebuild everything my code now links as expected.

0 Likes
1 Reply
YatheeshD_36
Moderator
Moderator
Moderator
750 replies posted 500 replies posted 250 solutions authored

Hello,

Thank you for pointing out to the issue. We will look into it and take the necessary actions.

Thanks,

Yatheesh

0 Likes