Hi All, Just been trying to compile rtl-sdr on my Windows7x64; so I have cloned the trunk repository, download mingw64, download cmake, get libusb-1.0 for windows and get pthreads-win32. After all I have configured cMake with the parameter show below:
CMAKE_RC_FLAGS:STRING= CMAKE_VERBOSE_MAKEFILE:BOOL=0 CMAKE_RC_COMPILER:FILEPATH=C:/Program Files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/windres.exe CMAKE_AR:FILEPATH=C:/Program Files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/ar.exe CMAKE_C_FLAGS:STRING= CMAKE_C_FLAGS_DEBUG:STRING= CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING= CMAKE_USE_RELATIVE_PATHS:BOOL=1 CMAKE_C_STANDARD_LIBRARIES:STRING=-lkernel32 -luser32 -lgdi32 -lwinspool -lshell32 -lole32 -loleaut32 -luuid -lcomdlg32 -ladvapi32 -lstdc++ CMAKE_C_COMPILER:FILEPATH=C:/Program Files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/x86_64-w64-mingw32-gcc.exe CMAKE_CODEBLOCKS_EXECUTABLE:FILEPATH=C:/Program Files/mingw-builds/x64-4.8.1-posix-seh-rev5/mingw64/bin/mingw32-make.exe LIBUSB_INCLUDE_DIR:PATH=E:/Staniscia/PRIVATO/RTL_SDR/libusbx/include/libusbx-1.0 LIBUSB_LIBRARIES:FILEPATH=E:/Staniscia/PRIVATO/RTL_SDR/libusbx/MinGW64/static/libusb-1.0.a THREADS_PTHREADS_INCLUDE_DIR:PATH=E:/Staniscia/PRIVATO/RTL_SDR/pthreads-win32/Pre-built.2/include THREADS_PTHREADS_WIN32_LIBRARY:FILEPATH=E:/Staniscia/PRIVATO/RTL_SDR/pthreads-win32/Pre-built.2/lib/x64/libpthreadGC2.a
and I don't have any warning from cMake but when I make the project I have this:
---------------------- E:\Staniscia\PRIVATO\RTL_SDR\repo\rtl-sdr\build>mingw32-make.exe clean
E:\Staniscia\PRIVATO\RTL_SDR\repo\rtl-sdr\build>mingw32-make.exe [ 5%] Building C object src/CMakeFiles/libgetopt_static.dir/getopt/getopt.c.obj Linking C static library liblibgetopt_static.a [ 5%] Built target libgetopt_static [ 10%] Building C object src/CMakeFiles/rtlsdr_shared.dir/librtlsdr.c.obj [ 15%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_e4k.c.obj [ 21%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_fc0012.c.obj [ 26%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_fc0013.c.obj [ 31%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_fc2580.c.obj [ 36%] Building C object src/CMakeFiles/rtlsdr_shared.dir/tuner_r820t.c.obj Linking C shared library librtlsdr.dll [ 36%] Built target rtlsdr_shared [ 42%] Building C object src/CMakeFiles/rtl_adsb.dir/rtl_adsb.c.obj Linking C executable rtl_adsb.exe [ 42%] Built target rtl_adsb [ 47%] Building C object src/CMakeFiles/rtl_eeprom.dir/rtl_eeprom.c.obj Linking C executable rtl_eeprom.exe [ 47%] Built target rtl_eeprom [ 52%] Building C object src/CMakeFiles/rtl_fm.dir/rtl_fm.c.obj Linking C executable rtl_fm.exe [ 52%] Built target rtl_fm [ 57%] Building C object src/CMakeFiles/rtl_sdr.dir/rtl_sdr.c.obj Linking C executable rtl_sdr.exe [ 57%] Built target rtl_sdr [ 63%] Building C object src/CMakeFiles/rtl_tcp.dir/rtl_tcp.c.obj ....\src\rtl_tcp.c: In function 'gettimeofday': ....\src\rtl_tcp.c:112:10: error: invalid suffix "Ui64" on integer constant tmp -= 11644473600000000Ui64; ^ src\CMakeFiles\rtl_tcp.dir\build.make:57: recipe for target 'src/CMakeFiles/rtl_tcp.dir/rtl_tcp.c.obj' failed mingw32-make.exe[2]: *** [src/CMakeFiles/rtl_tcp.dir/rtl_tcp.c.obj] Error 1 CMakeFiles\Makefile2:319: recipe for target 'src/CMakeFiles/rtl_tcp.dir/all' failed mingw32-make.exe[1]: *** [src/CMakeFiles/rtl_tcp.dir/all] Error 2 Makefile:115: recipe for target 'all' failed mingw32-make.exe: *** [all] Error 2
----------------------
Someone can help me?
Just been trying to compile rtl-sdr on my Windows7x64; so I have cloned the trunk repository, download mingw64, download cmake, get libusb-1.0 for windows and get pthreads-win32.
....\src\rtl_tcp.c:112:10: error: invalid suffix "Ui64" on integer constant tmp -= 11644473600000000Ui64;
Someone can help me?
It looks like the "i64" suffix is specific to Microsoft VC++. I guess since you're compiling for Windows it's assumed you'll be using the MS compiler. Try changing the "Ui64" at the end of the number to the standard "ULL" instead and see if that lets you finish compiling.
Cheers, Adam.
Take a look at my mingw build script: http://kmkeen.com/tmp/mingw32.sh.txt
-Kyle http://kmkeen.com
It sounds good, thanks! Now I have compiled rtl_sdr_x64 on Windows7x64 arch and it shows only Ui64 problem. I didn't do other 'sed-operation' on C files ( useful script keenerd!!! ) but I have added -lws2_32 to resolve the undefined reference (it's a known fail on mingws user community)
Thanks
On 09/10/2013 13:58, keenerd wrote:
Take a look at my mingw build script: http://kmkeen.com/tmp/mingw32.sh.txt
-Kyle http://kmkeen.com
On 09/10/2013 13:03, Adam Nielsen wrote:
Just been trying to compile rtl-sdr on my Windows7x64; so I have cloned the trunk repository, download mingw64, download cmake, get libusb-1.0 for windows and get pthreads-win32.
....\src\rtl_tcp.c:112:10: error: invalid suffix "Ui64" on integer constant tmp -= 11644473600000000Ui64;
Someone can help me?
It looks like the "i64" suffix is specific to Microsoft VC++. I guess since you're compiling for Windows it's assumed you'll be using the MS compiler. Try changing the "Ui64" at the end of the number to the standard "ULL" instead and see if that lets you finish compiling.
Cheers, Adam.