compiling in windows 10

353 views
Skip to first unread message

H S

unread,
Nov 4, 2021, 7:16:30 PM11/4/21
to rtl_433
having a hard time compiling in RTL433 in windows 10
trying to follow the procedure from 
but the file

FindLibUSB.cmake

is not in the most recent source from 

eventually downloaded from 


but not sure if it's equivalent.

everything else done as indicated but getting errors compiling:

------------------------

C:\librtlsdr-master\build>cmake -G "MinGW Makefiles" ../
CMake Deprecation Warning at CMakeLists.txt:24 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: C:/MinGW/bin/gcc.exe
-- Check for working C compiler: C:/MinGW/bin/gcc.exe - broken
CMake Error at C:/Program Files/CMake/share/cmake-3.22/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "C:/MinGW/bin/gcc.exe"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: C:/librtlsdr-master/build/CMakeFiles/CMakeTmp

    Run Build Command(s):C:/MinGW/bin/mingw32-make.exe -f Makefile cmTC_367fb/fast && C:/MinGW/bin/mingw32-make.exe  -f CMakeFiles\cmTC_367fb.dir\build.make CMakeFiles/cmTC_367fb.dir/build
    mingw32-make.exe[1]: Entering directory 'C:/librtlsdr-master/build/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_367fb.dir/testCCompiler.c.obj
    C:\MinGW\bin\gcc.exe    -o CMakeFiles\cmTC_367fb.dir\testCCompiler.c.obj -c C:\librtlsdr-master\build\CMakeFiles\CMakeTmp\testCCompiler.c
    CMakeFiles\cmTC_367fb.dir\build.make:76: recipe for target 'CMakeFiles/cmTC_367fb.dir/testCCompiler.c.obj' failed
    mingw32-make.exe[1]: *** [CMakeFiles/cmTC_367fb.dir/testCCompiler.c.obj] Error 1
    mingw32-make.exe[1]: Leaving directory 'C:/librtlsdr-master/build/CMakeFiles/CMakeTmp'
    Makefile:126: recipe for target 'cmTC_367fb/fast' failed
    mingw32-make.exe: *** [cmTC_367fb/fast] Error 2

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:25 (project)

-- Configuring incomplete, errors occurred!
See also "C:/librtlsdr-master/build/CMakeFiles/CMakeOutput.log".
See also "C:/librtlsdr-master/build/CMakeFiles/CMakeError.log".

-------------------------


I can provide the log as well if needed

Can you pinpoint what is wrong? 
or is there an up to date windows version compiled available ?
There used to be a source but the link is dead now.

Thanks!



Michael Cadiere

unread,
Nov 5, 2021, 2:34:00 AM11/5/21
to rtl_433
total rabbit hole, tried this last year, tried again tonight, I can only get to 90% . use this librtlsdr(got me past errors building librtlsdr)
findlibusb.cmake
i ended up using the mingw64\x86_64-w64-mingw32\include folder instead of the mingw64\include

last year I ended up compiling it with visual studio ,but damn if I havent forgotten how

5 hours later......"rabbit hole" lol
will be keeping an eye out too see if you figure it out

433_build.png

Christian Z.

unread,
Nov 5, 2021, 3:40:36 AM11/5/21
to rtl_433
For our build checks and releases we compile with both of: MSVC on Windows (native) and MinGW-w64 on Linux (Cross-build). You can see the steps in our .github/workflows/release.yml file.
Using MinGW-w64 on Windows should work too, but we don't have an automated test.

Try a build with "-DENABLE_RTLSDR=OFF" first, to get just rtl_433 to compile, then include rtlsdr later (and SoapySDR, OpenSSL if you need).

The error you got is about MSVC flags (/MP /wd4251 /wd4503) not working in MinGW -- I guess the configuration from the librtlsdr introduces those.

Michael Cadiere

unread,
Nov 5, 2021, 6:44:57 AM11/5/21
to rtl_433

Christian Z.

unread,
Nov 5, 2021, 8:20:40 AM11/5/21
to rtl_433

getting it done vid

Great! Thanks!
 

H S

unread,
Nov 5, 2021, 8:59:35 AM11/5/21
to rtl_433
So just to be clear, I should use :

Source from librtlsdr

mingw32\include folder

Anything else xxxxx32 over xxxxx64

-DENABLE_RTLSDR=OFF. (haven't checked yet - in which file should this be modified?)

I don't expect to compile on a regular basis but wow is this time consuming...
There is no such thing as a precompiled windows version repository, right?

Thx.

H S

unread,
Nov 5, 2021, 9:12:45 AM11/5/21
to rtl_433
Also, I see the following in the previous comment "went back and turned off soapy & OpenSSL ,turned on Rtl-sdr.."

How do I turn off soapy & OpenSSL ?
Editing a config file I guess but not sure which one/where...

Thanks for your support.


Christian Z.

unread,
Nov 5, 2021, 9:36:55 AM11/5/21
to rtl_433
SoapySDR and OpenSSL are off by default (unless found). Those "-D" are cmake options.

But yes, we do have release builds: https://github.com/merbanan/rtl_433/releases

H S

unread,
Nov 5, 2021, 11:20:43 AM11/5/21
to rtl_433
Thanks, for some reason I couldn't trace back the release builds link....
Anyways, I'll have a working process to compile if needed ;)
Cheers,

Christian Z.

unread,
Nov 5, 2021, 11:32:08 AM11/5/21
to rtl_433
Anyways, I'll have a working process to compile if needed ;)

Always good to test and see more different ways to build/deploy/use. Thanks!

Michael Cadiere

unread,
Nov 5, 2021, 12:58:11 PM11/5/21
to rtl_433
Cmake-Auto-on-Auto.png
Reply all
Reply to author
Forward
0 new messages