Author Message

<  Everything Coding  ~  Cross Compiling

PostPosted: Fri Feb 27, 2009 7:29 am Reply with quote
Posts: 2 Joined: Fri Feb 27, 2009 7:18 am
I'm trying to compile usb_modeswitch for a WRT54G3G router running Kamikaze . It uses a broadcom CPU. I've built the tool chain for the arch and I have a working gcc 3.4.6 (That's the latest version I can find for the given arch). However, I get the following errors at compile time:

usb_modeswitch.c: In function `main':
usb_modeswitch.c:298: warning: assignment makes pointer from integer without a cast
usb_modeswitch.c: In function `search_devices':
usb_modeswitch.c:515: warning: assignment makes pointer from integer without a cast
usb_modeswitch.c:515: error: dereferencing pointer to incomplete type
usb_modeswitch.c:517: error: dereferencing pointer to incomplete type
usb_modeswitch.c:517: error: dereferencing pointer to incomplete type
usb_modeswitch.c:518: error: dereferencing pointer to incomplete type
usb_modeswitch.c:518: error: dereferencing pointer to incomplete type
usb_modeswitch.c:520: error: dereferencing pointer to incomplete type
usb_modeswitch.c:522: error: dereferencing pointer to incomplete type

Any help would be greatly appreciated.

Thank you,
Scott


Offline
PostPosted: Thu Mar 12, 2009 3:19 pm Reply with quote
Site Admin Posts: 6423 Joined: Sat Nov 03, 2007 12:30 am
Been on vacation, thus the late answer.

Can you check "/usr/include/usb.h"? It might be in a different place on your system, but anyway it should contain these lines:

Code:
struct usb_device {
  struct usb_device *next, *prev;

  char filename[PATH_MAX + 1];

  struct usb_bus *bus;

  struct usb_device_descriptor descriptor;
  struct usb_config_descriptor *config;

  void *dev;      /* Darwin support */

  u_int8_t devnum;

  unsigned char num_children;
  struct usb_device **children;
};

struct usb_bus {
  struct usb_bus *next, *prev;

  char dirname[PATH_MAX + 1];

  struct usb_device *devices;
  u_int32_t location;

  struct usb_device *root_dev;
};

If you can't find the file or if these lines are missing, you need to get a working libusb on your system.


Offline
PostPosted: Thu Mar 12, 2009 4:05 pm Reply with quote
Posts: 2 Joined: Fri Feb 27, 2009 7:18 am
I found that. Then I had trouble getting the linker to find libusb. Before I could get it compiled, I stumbled on to the latest version of openWrt, and found out that someone else had already done the work, and added the package to the default repositories. I got it all up and working just last night.

Thanks,


Offline

Display posts from previous:  Sort by:

All times are UTC+02:00
Page 1 of 1
3 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