compiling rtl-sdr on win10 with qtcreator

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

Luigi Tarenga luigi.tarenga at gmail.com
Sat Dec 17 10:15:32 UTC 2016


Hi Hayati,
actually I'm working with a clone of git://git.osmocom.org/rtl-sdr

I remember the file you mention is on the librtlsdr fork on github...
( https://github.com/librtlsdr/librtlsdr/blob/master/win32-qtcreator/CMakeLists.txt
)
I'm missing something?

My objective now is to build the original rtl-sdr and try to apply some patches
on that tree. I will try out your cmake file in win32-qtcreator in the future
as I see it's simpler to use and the static library is a good idea.

As to yesterday I manager to build rtl-sdr. the summary is:
I tried to build with the mingw installed by qtcreator but this fail as it miss
libpthread and I can't figure out own to install additional library
into this mingw.
I then configured qtcreator to build using my mingw installed apart and in this
mingw I have libpthread installed. Initially it failed and I find out that
the  in the file FindThread.cmake there is a reference to an different
library (older?)
I change the line:
SET (_Threads_pthreads_libname
pthreadG${THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME}2)

with
SET (_Threads_pthreads_libname
libpthreadG${THREADS_PTHREADS_WIN32_EXCEPTION_SCHEME}-3)

does anyone know if I'm using a too recent pthread library or the
FindThread.cmake needs a patch?

anyway this solved my make generation problem. no problem during compilation.

Luigi


On Fri, Dec 16, 2016 at 10:04 PM, Hayati Ayguen <h_ayguen at web.de> wrote:
> Hi Luigi,
> i had created the CMakelist below the librtlsdr/tree/master/win32-qtcreator
> subdirectory. You should directly open the CMakelist from here in qtcreator.
>
> I just needed the first non commented line setting LIBUSBBASE:
>
> # edit this path
> SET( LIBUSBBASE C:/src/_foreign/libusb-1.0.20 )
>
> Everything else comes from/with the qt/creator installation including mingw.
>
> For me quite important is the FULL_STATIC Build option,  that the result does not need any gcc/libusb or pthread dlls.
>
> Kind Regards,
> Hayati
>
>
> ---
> Hayati Aygün <h_ayguen at web.de>
>
>
> Am 16. Dezember 2016 16:33:00 MEZ, schrieb Luigi Tarenga <luigi.tarenga at gmail.com>:
>>hello Hayati,
>>thanks for the feedback. unfortunately I cannot find the commended
>>lines you mention.
>>just to be clear, I cloned rtl-sdr git and I'm at commit
>>e3e6ee23b7f052327bf64c6908f5c09b75029edc
>>
>>I solved the problem editing  cmake/Modules/FindLibUSB.cmake
>>I addeded c:/..blablabla../libusb/include/libusb-1.0  and
>>c:/..blablabla../libusb/lib
>>in the find_path() and find_library() blocks respectively.
>>
>>I'm now trying to figure out how add pthread-win32 to the qt mingw (I
>>have installed libpthread in
>>the mingw directory used for compiling libusb but qtcreator seems to
>>have its own mingw environment
>>and the latter one is missing pthread-win32 ... )
>>
>>regards
>>Luigi
>>
>>On Fri, Dec 16, 2016 at 2:52 PM, Hayati Ayguen <h_ayguen at web.de> wrote:
>>> Hi Luigi,
>>> i modified the pathes in the CMakeLists.txt for mingw/qtcreator for
>>compilation. Think, i commented it in the head of the file.
>>> Kind Regards,
>>> Hayati
>>> ---
>>> Hayati Aygün <h_ayguen at web.de>
>>>
>>>
>>> Am 16. Dezember 2016 13:18:58 MEZ, schrieb Luigi Tarenga
>><luigi.tarenga at gmail.com>:
>>>>hello,
>>>>I'm trying to build rtl-sdr on win10. I choosed to use mingw and
>>>>qtcreator.
>>>>I installed:
>>>>cmake 3.7.1
>>>>qtcreate 4.2.0
>>>>mingw32 (to build libusb)
>>>>
>>>>I compiled libusb with mingw32 and automake and installed in
>>>>Desktop\libusb\.
>>>>
>>>>Now I'm trying to find out how to generate make files for rtl-sdr
>>>>passing
>>>>the folder where I installed libusb (library and header) in
>>qtcreator.
>>>>I don't understand if I have to modify CMakeLists.txt or there is
>>some
>>>>gui to enter
>>>>the correct parameter. I have even to find out if I have to explicit
>>>>the
>>>>variable LIBUSB_PKG_INCLUDE_DIRS or what...
>>>>
>>>>running cmake (from qtcreator) returns with error that I'm missing
>>>>libusb and libpthread.
>>>>I think that once I can solve the problem for libusb I will be able
>>to
>>>>solve even the one of
>>>>libpthread. can someone help me in this phase?
>>>>
>>>>thanks
>>>>Luigi
>>>
>



More information about the osmocom-sdr mailing list