fix win32 build of rtl_test

Signed-off-by: Steve Markgraf <steve@steve-m.de>
master
Hoernchen 13 years ago committed by Steve Markgraf
parent 09547797dc
commit 551a2d2037
  1. 1
      src/CMakeLists.txt
  2. 8
      src/rtl_test.c

@ -77,6 +77,7 @@ target_link_libraries(rtl_test rtlsdr_static
if(WIN32)
set_property(TARGET rtl_sdr APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
set_property(TARGET rtl_tcp APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
set_property(TARGET rtl_test APPEND PROPERTY COMPILE_DEFINITIONS "rtlsdr_STATIC" )
endif()
########################################################################
# Install built library files & utilities

@ -45,8 +45,8 @@ void usage(void)
{
#ifdef _WIN32
fprintf(stderr,"rtl-sdr, an I/Q recorder for RTL2832 based USB-sticks\n\n"
"Usage:\t rtl-sdr-win.exe [device_index] [samplerate in kHz] "
"[gain] [frequency in Hz] [filename]\n");
"Usage:\t rtl-test-win.exe [device_index] [samplerate in kHz] [e4k test mode]\n"
"\ti.e. rtl-test-win.exe 0 2048 1\n");
#else
fprintf(stderr,
"rtl_test, librtlsdr test tool\n\n"
@ -192,10 +192,12 @@ int main(int argc, char **argv)
#else
/* TODO fix win usage */
if (argc < 2)
if (argc < 3)
usage();
dev_index = atoi(argv[1]);
samp_rate = atoi(argv[2])*1000;
if (argc >3 && argv[3][0] == '1')
tuner_benchmark = 1;
#endif
if(out_block_size < MINIMAL_BUF_LENGTH ||
out_block_size > MAXIMAL_BUF_LENGTH ){

Loading…
Cancel
Save