Author Message

<  Everything Coding  ~  USB_ModeSwitch 1.0.0 does not compile

PostPosted: Sat Jun 06, 2009 1:42 pm Reply with quote
Posts: 4 Joined: Sat Jun 06, 2009 1:33 pm
Hello there, hello Josh.

USB_ModeSwitch 1.0.0 does not compile on IPCop (Dev.Edition, Kernel 2.4.36).

Code:
gcc -l usb -o usb_modeswitch usb_modeswitch.c
/tmp/ccQ7ewyQ.o(.text+0x20c6): In function `detachDriver':
: undefined reference to `usb_get_driver_np'
/tmp/ccQ7ewyQ.o(.text+0x2170): In function `detachDriver':
: undefined reference to `usb_detach_kernel_driver_np'
collect2: ld returned 1 exit status
make: *** [usb_modeswitch] Error 1

USB_ModeSwitch 0.9.7 and older versions compile without any errors.

If you need further informations, please let me know.

Cheers Tom


Offline
PostPosted: Sun Jun 07, 2009 5:41 pm Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
Very strange.

The function detachDriver() has not changed from 0.9.7 ...

I can think of only one cause for that error: a discrepancy between the library file libusb.so and the include file "usb.h".

The missing functions during your link process are the ones which are not available on BSD systems. The "usb.h" file usually reflects this; the preprocessor lines in detachDriver() consequently skip calling these functions.

Which libusb version is used on IPCop?


Offline
PostPosted: Sun Jun 07, 2009 6:05 pm Reply with quote
Posts: 4 Joined: Sat Jun 06, 2009 1:33 pm
It's libusb 0.1.7 (legacy).

I was wrong saying that 0.9.7 compiles. I confused something.
USB_ModeSwitch never compiled on IPCop so I used the precompiled binary in the past.

Sorry for this misinformation.


Offline
PostPosted: Tue Jun 09, 2009 10:31 pm Reply with quote
Site Admin Posts: 6441 Joined: Sat Nov 03, 2007 12:30 am
Are you interested in a statically linked binary?

Or do you have the possibility to update libusb?


Offline
PostPosted: Tue Jun 09, 2009 10:35 pm Reply with quote
Posts: 4 Joined: Sat Jun 06, 2009 1:33 pm
Josh wrote:
Or do you have the possibility to update libusb?

I have. I'll try that first and will give you feedback.


Offline
PostPosted: Thu Aug 06, 2009 8:37 pm Reply with quote
Posts: 4 Joined: Sat Jun 06, 2009 1:33 pm
Josh wrote:
Or do you have the possibility to update libusb?

That did the trick. Thanks a lot.


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
6 posts
Users browsing this forum: No registered users and 1 guest
Search for:
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum