Hello Gisle,
Thank you for your reply,
>> Do you also have 'libusb-1.0.dll.a' in that same directory? I.e. the
import
lib.
No, I have only checked "libusbx-1.0.17-win\MinGW64\static" folder and
copied libusb-1.0.a to the corresponding folder in my project structure.
>> Exactly what is the command to link your C++ project?
On the CDT Build Console, the following command is executed:
g++ "-LE:\\Work-Win7\\ATMEL\\Workspace\\USBDevCtrl\\libsusbx-1.0.17-win" -o
USBDevCtrl "src\\USBDevCtrl.o" "src\\CUsbDevice.o" "src\\CLibUsbWrapper.o"
"src\\CHelp.o" -lusb-1.0
On Thu, Jan 2, 2014 at 1:37 PM, Gisle Vanem <gisle.va...@gmail.com> wrote:
> "Mehmet Akif Antepli" <akifante...@gmail.com> wrote:
>
> > Even tough, I have included correct path for the header "libusb.h" and
> > `libusb-1.0.a` and linked the static library with the command
> "-lusb-1.0",
> > when I try to build my c++ project, I get "undefined reference to
> > `libusb_<xxx>" errors (xxx is any function called from the libusbx)
>
> Do you also have 'libusb-1.0.dll.a' in that same directory? I.e. the import
> lib. And are you aware of the contorted logic behind the ld search for
> libs?
> >From the ld manual:
>
> [...] when ld is called with the argument `-lxxx' it will attempt to
> find, in the first directory of its search path,
>
> libxxx.dll.a
> xxx.dll.a
> libxxx.a
> etc.
>
> before moving on to the next directory in the search path.
>
> So yes, what you see could be expected behavior.
> Better use explicit linking. I.e. <libusbx-root>/lib/libusb-1.0.a.
>
> Exactly what is the command to link your C++ project?
>
> --gv
>
>
> ------------------------------------------------------------------------------
> Rapidly troubleshoot problems before they affect your business. Most IT
> organizations don't have a clear picture of how application performance
> affects their revenue. With AppDynamics, you get 100% visibility into your
> Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics
> Pro!
> http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
> _______________________________________________
> libusbx-devel mailing list
> libusbx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/libusbx-devel
>
--
Akif
------------------------------------------------------------------------------
Rapidly troubleshoot problems before they affect your business. Most IT
organizations don't have a clear picture of how application performance
affects their revenue. With AppDynamics, you get 100% visibility into your
Java,.NET, & PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro!
http://pubads.g.doubleclick.net/gampad/clk?id=84349831&iu=/4140/ostg.clktrk
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel