mingw32

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/osmocom-sdr@lists.osmocom.org/.

Leif Asbrink leif at sm5bsz.com
Tue Jan 22 17:24:48 UTC 2013


Hi,

Attempts to link librtlsdr and libusb-1.0 with my project
Linrad gives these warning messages:
Warning: .drectve `-aligncomm:"__poll_fd",5 ' unrecognized
Warning: .drectve `-aligncomm:"_poll_fd",5' unrecognized
Warning: .drectve `-aligncomm:"_htab_filled",2 ' unrecognized
Warning: .drectve `-aligncomm:"_htab_size",2 ' unrecognized
Warning: .drectve `-aligncomm:"_timer_tp",2 ' unrecognized
Warning: .drectve `-aligncomm:"_autoclaim_lock",2 ' unrecognized
Warning: .drectve `-aligncomm:"_hires_ticks_to_ps",3 ' unrecognized
Warning: .drectve `-aligncomm:"_hires_frequency",3' unrecognized

I get an executable and it runs OK until to rtlsdr_read_async(....) 
is called from a separate thread.

Once async read is running the calls to libusb no longer work OK.
Windows crashes on call to libusb_control_transfer.

By issuing a wait in the thread that calls rtlsdr_read_async
I can assure that no calls will be made to libusb_control_transfer
after async is started.

The call to libusb_handle_events_timeout returns -1 which is
LIBUSB_ERROR_IO about 3 times more often than it returns zero. 
By ignoring this error I have a running system, it receives
the antenna signal fine from the dongle.

BUT if I try to change frequency or gain Windows crashes. Also
if I try to exit. It seems one must not call anything
else in libusb-1.0 after having started read.

I have used mingw32, the standard install under Ubuntu.
I was unable to use the configure script but made a simple
script to compile with /usr/bin/i586-mingw32msvc-gcc
and then create the library and install like this:

/usr/bin/i586-mingw32msvc-ar rc librtlsdr.a librtlsdr.o tuner_tuner_fc0013.o tuner_fc2580.o tuner_r820t.o

/usr/bin/i586-mingw32msvc-ranlib librtlsdr.a

cp librtlsdr.a /usr/i586-mingw32msvc/lib

The libusb-1.0.a file is from the MinGW32 directory
in libusbx-1.0.14-win.7z 

What can I do to fix the problem?

Regards

Leif





More information about the osmocom-sdr mailing list