Thanks for your kind answers and help, I always appreciate. @Alan OK I will try using USB console according to your tutorial to continue my experiments.
@Nathan yes I already removed #include <nuttx/config.h> and I don't have problem in Ubuntu, my code compiles and runs as expected. I am also aware of that this issue has been many times before however I couldn't resolve the issue, but working on it. I will try to get help from your explanations. On 2021/07/04 18:12:11, Nathan Hartman <hartman.nat...@gmail.com> wrote: > > On Sunday, July 4, 2021, murat tologlu <mtolo...@hotmail.com> wrote: > > > > netlib_setifstatus.c: In function 'netlib_ifup': > > > > netlib_setifstatus.c:67:27: error: 'NETLIB_SOCK_TYPE' undeclared (first > > > use in this function); did you mean 'NETLIB_SOCK_FAMILY'? > > > > 67 | NETLIB_SOCK_TYPE, > > > NETLIB_SOCK_PROTOCOL); > > > > | ^~~~~~~~~~~~~~~~ > > > > | NETLIB_SOCK_FAMILY > > > > netlib_setifstatus.c:67:27: note: each undeclared identifier is reported > > > only once for each function it appears in > > Note that this issue has been seen before. See: > > https://github.com/apache/incubator-nuttx-apps/issues/375 > > NETLIB_SOCK_TYPE is defined in the incubator-nuttx-apps repository in > include/netutils/netlib.h and its definition depends on the following > Kconfigs: > > [[[ > > /* Using the following definitions, the following socket() arguments should > * provide a valid socket in all configurations: > * > * ret = socket(NETLIB_SOCK_FAMILY, NETLIB_SOCK_TYPE, > * NETLIB_SOCK_PROTOCOL); > */ > > /* The address family that we used to create the socket really does not > * matter. It should, however, be valid in the current configuration. > */ > > #if defined(CONFIG_NET_IPv4) > # define NETLIB_SOCK_FAMILY AF_INET > #elif defined(CONFIG_NET_IPv6) > # define NETLIB_SOCK_FAMILY AF_INET6 > #elif defined(CONFIG_NET_LOCAL) > # define NETLIB_SOCK_FAMILY AF_LOCAL > #elif defined(CONFIG_NET_PKT) > # define NETLIB_SOCK_FAMILY AF_PACKET > #elif defined(CONFIG_NET_CAN) > # define NETLIB_SOCK_FAMILY AF_CAN > #elif defined(CONFIG_NET_IEEE802154) > # define NETLIB_SOCK_FAMILY AF_IEEE802154 > #elif defined(CONFIG_WIRELESS_PKTRADIO) > # define NETLIB_SOCK_FAMILY AF_PKTRADIO > #elif defined(CONFIG_NET_BLUETOOTH) > # define NETLIB_SOCK_FAMILY AF_BLUETOOTH > #elif defined(CONFIG_NET_USRSOCK) > # define NETLIB_SOCK_FAMILY AF_INET > #elif defined(CONFIG_NET_NETLINK) > # define NETLIB_SOCK_FAMILY AF_NETLINK > #else > # define NETLIB_SOCK_FAMILY AF_UNSPEC > #endif > > ]]] > > More below... > > On Sun, Jul 4, 2021 at 12:43 PM Alan Carvalho de Assis > <acas...@gmail.com> wrote: > > > > Hi Murat, > > > > Just use the netnsh config and follow my video tutorial explaining how to > > use USB Console. > > > > It is easy when you know which options to look at on menuconfig. It is > > important to get used to menuconfig, otherwise it always will be like a > > maze. > > How to search for configs in the Kconfig files: > > Option 1, interactively in the ncurses-based menuconfig program: > Unless this depends on locale settings, the '/' (forward slash) > character brings up a window where you can type in a config name to > search for it; pay attention to the NOTE below... > > Option 2, grep for these identifiers through the Kconfig files > themselves. Note that these files are located in various places > throughout the NuttX and apps trees, so you need to search recursively > using your favorite grepping tool. > > NOTE: If a config option is called CONFIG_FOO_BAR in source code, it > is called FOO_BAR in Kconfig, so omit the CONFIG_ prefix when > searching. Alternately you can grep for search terms in the Kconfig > files themselves. > > Kconfig options often depend on other Kconfig options, so you need to > verify that you have the dependencies. Option 1 is easiest for this, > since the menuconfig program will show you the dependencies for an > option when you search for it, or when you bring up the help about it. > It will say "depends on" and list out all the dependencies, with their > actual values. So if something doesn't even show up in the menus, look > carefully at the dependencies shown by the program and determine which > one(s) are not configured that should be configured. > > Hope this helps, > Nathan >