discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] Gnuradio compile errors


From: Josh Blum
Subject: Re: [Discuss-gnuradio] Gnuradio compile errors
Date: Sun, 03 Jun 2012 23:48:32 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:12.0) Gecko/20120430 Thunderbird/12.0.1


On 06/03/2012 05:14 PM, Phil wrote:
> /usr/local/src/gnuradio-3.6.0/gnuradio-core/src/lib/io/gr_udp_sink.cc:
> In constructor ‘gr_udp_sink::gr_udp_sink(size_t, const char*, short
> unsigned int, int, bool)’:
> /usr/local/src/gnuradio-3.6.0/gnuradio-core/src/lib/io/gr_udp_sink.cc:123:51:
> error: ‘optval_t’ was not declared in this scope
> make[2]: ***
> [gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/io/gr_udp_sink.cc.o]
> Error 1
> make[1]: *** [gnuradio-core/src/lib/CMakeFiles/gnuradio-core.dir/all]
> Error 2
> make: *** [all] Error 2

accounting for indentation, the code looks like this:

#if defined(HAVE_NETDB_H)
    #include <netdb.h>
    #ifdef HAVE_SYS_TYPES_H
        #include <sys/types.h>
    #endif

    #ifdef HAVE_SYS_SOCKET_H
        #include <sys/socket.h>  //usually included by <netdb.h>?
    #endif
    typedef void* optval_t;
#elif defined(HAVE_WINDOWS_H)
    // if not posix, assume winsock
    #define USING_WINSOCK
    #include <winsock2.h>
    #include <ws2tcpip.h>
    #define SHUT_RDWR 2
    typedef char* optval_t;
#endif

Im guessing that configure did not find netdb.h and if you make
VERBOSE=1, HAVE_NETDB_H will not be in the defines. Can you confirm.

(guess we should have used asio and not tried to write our own cross
platform sockets code)

-josh



reply via email to

[Prev in Thread] Current Thread [Next in Thread]