Hello again,

When i tried with libusb-1.0.dll.a (under ~\libusbx-1.0.17-win\MinGW32\dll
directory), i could be able to build.  After providing corresponding dll
(libusb-1.0.dl) for the executable, the program works now. (Even though i
use dll not a static library ...)

My new problem is that when i claim interface of my Atmel USB device,
"libusb_claim_interface" returns  the following error

/** Access denied (insufficient permissions) */
    LIBUSB_ERROR_ACCESS = -3,

Using same code, I can communicate with my Atmel USB device in Ubuntu
12.04.3 x64 with libusbx v1.0.17. So, there is no problem with device
descriptor and corresponding interface numbers. I have tried running the
host application as administrator but again it did not worked. Previously,
in Win7, using libusb-win32, i could communicate with the my device but
with different code. Now, i just want to use same code for both Win7 and
Ubuntu.

Any ideas?

Thanks in advance,


On Thu, Jan 2, 2014 at 7:38 PM, Mehmet Akif Antepli
<akifante...@gmail.com>wrote:

> 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
>



-- 

Mehmet Akif Antepli
------------------------------------------------------------------------------
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

Reply via email to