Hello Marc, Thank you for your response.
In fact, it was a little more than that: I didn't set the library group in cmake and also didn't set the correct linker. Solving these issues, I could have it working and running. Thank you very much. Best regards, Flavio Em sex., 11 de dez. de 2020 às 09:31, Marc Rosen <ma...@zeitcontrol.de> escreveu: > > Hi Flavio, > > well I think there are two problems: > > 1. it seems either you are missing libarch.a or you have a library order > problem. > Because ld can not find up_exit etc. those are arch specific functions. > > 2. I would recommend you to add the flag -nostdlib. At least it is going > to avoid newlib symbol problems. > > regards, > marc > Am 11.12.2020 um 13:07 schrieb Flavio Castro Alves Filho: > > Hello, > > > > Has anybody here used NuttX as a library and a C++ project with cmake? > > > > I tried to create a project (using hellocxx example) with this setup, > > but I was not successful. I can build, but I cannot link. > > > > My link errors are the following: > > > > [ 33%] Linking CXX executable hellocpp > > > > > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/crt0.o: > > in function `_mainCRTStartup': > > /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m/nofp/libgloss/arm/semihv2m/../../../../../../../../libgloss/arm/crt0.S:545: > > undefined reference to `main' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(exit.o): > > in function `_exit': > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/exit.c:56: undefined > > reference to `up_exit' > > > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/exit.c:56: undefined > > reference to `up_exit' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(nx_start.o): > > in function `nx_start': > > /home/ubuntu/Documents/nuttx/nuttx/sched/init/nx_start.c:537: > > undefined reference to `up_initial_state' > > > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/init/nx_start.c:566: > > undefined reference to `up_allocate_heap' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/init/nx_start.c:567: > > undefined reference to `umm_initialize' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/init/nx_start.c:598: > > undefined reference to `iob_initialize' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/init/nx_start.c:618: > > undefined reference to `fs_initialize' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/init/nx_start.c:701: > > undefined reference to `up_initialize' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/init/nx_start.c:733: > > undefined reference to `binfmt_initialize' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/init/nx_start.c:785: > > undefined reference to `syslog_initialize' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/init/nx_start.c:832: > > undefined reference to `up_idle' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sched_lock.o): > > in function `sched_lock': > > /home/ubuntu/Documents/nuttx/nuttx/sched/sched/sched_lock.c:242: > > undefined reference to `up_interrupt_context' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sched_unlock.o): > > in function `sched_unlock': > > /home/ubuntu/Documents/nuttx/nuttx/sched/sched/sched_unlock.c:227: > > undefined reference to `up_interrupt_context' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/sched/sched_unlock.c:273: > > undefined reference to `up_release_pending' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(task_create.o): > > in function `nxthread_create': > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/task_create.c:81: > > undefined reference to `zalloc' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(task_init.o): > > in function `nxtask_init': > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/task_init.c:115: > > undefined reference to `up_use_stack' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/task_init.c:121: > > undefined reference to `up_create_stack' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/task_init.c:174: > > undefined reference to `up_release_stack' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(task_setup.o): > > in function `nxthread_setup_scheduler': > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/task_setup.c:415: > > undefined reference to `up_initial_state' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/task_setup.c:415: > > undefined reference to `up_initial_state' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(task_setup.o): > > in function `nxtask_setup_stackargs': > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/task_setup.c:550: > > undefined reference to `up_stack_frame' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(task_activate.o): > > in function `nxtask_activate': > > /home/ubuntu/Documents/nuttx/nuttx/sched/task/task_activate.c:80: > > undefined reference to `up_unblock_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(group_create.o): > > in function `group_allocate': > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_create.c:222: > > undefined reference to `zalloc' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(group_leave.o): > > in function `group_release': > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_leave.c:152: > > undefined reference to `files_releaselist' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(group_setupidlefiles.o): > > in function `group_setupidlefiles': > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_setupidlefiles.c:86: > > undefined reference to `files_initlist' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_setupidlefiles.c:100: > > undefined reference to `nx_open' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_setupidlefiles.c:105: > > undefined reference to `fs_dupfd2' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_setupidlefiles.c:106: > > undefined reference to `fs_dupfd2' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(group_setuptaskfiles.o): > > in function `group_setuptaskfiles': > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_setuptaskfiles.c:209: > > undefined reference to `files_initlist' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(group_setuptaskfiles.o): > > in function `sched_dupfiles': > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_setuptaskfiles.c:108: > > undefined reference to `file_dup2' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(mq_release.o): > > in function `nxmq_release': > > /home/ubuntu/Documents/nuttx/nuttx/sched/mqueue/mq_release.c:55: > > undefined reference to `nxmq_close_group' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sched_releasetcb.o): > > in function `nxsched_release_tcb': > > /home/ubuntu/Documents/nuttx/nuttx/sched/sched/sched_releasetcb.c:134: > > undefined reference to `up_release_stack' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sem_wait.o): > > in function `nxsem_wait': > > /home/ubuntu/Documents/nuttx/nuttx/sched/semaphore/sem_wait.c:78: > > undefined reference to `up_interrupt_context' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/semaphore/sem_wait.c:153: > > undefined reference to `up_block_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sem_clockwait.o): > > in function `nxsem_clockwait': > > /home/ubuntu/Documents/nuttx/nuttx/sched/semaphore/sem_clockwait.c:99: > > undefined reference to `up_interrupt_context' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sem_post.o): > > in function `nxsem_post': > > /home/ubuntu/Documents/nuttx/nuttx/sched/semaphore/sem_post.c:156: > > undefined reference to `up_unblock_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sem_waitirq.o): > > in function `nxsem_wait_irq': > > /home/ubuntu/Documents/nuttx/nuttx/sched/semaphore/sem_waitirq.c:109: > > undefined reference to `up_unblock_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sig_dispatch.o): > > in function `nxsig_tcbdispatch': > > [48/1347]/home/ubuntu/Documents/nuttx/nuttx/sched/signal/sig_dispatch.c:370: > > undefined reference to `up_unblock_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sig_dispatch.o): > > in function `nxsig_alloc_pendingsignal': > > /home/ubuntu/Documents/nuttx/nuttx/sched/signal/sig_dispatch.c:140: > > undefined reference to `up_interrupt_context' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sig_dispatch.o): > > in function `nxsig_tcbdispatch': > > /home/ubuntu/Documents/nuttx/nuttx/sched/signal/sig_dispatch.c:402: > > undefined reference to `up_schedule_sigaction' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/signal/sig_dispatch.c:413: > > undefined reference to `up_unblock_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(clock_initialize.o): > > in function `clock_basetime': > > /home/ubuntu/Documents/nuttx/nuttx/sched/clock/clock_initialize.c:105: > > undefined reference to `up_rtc_getdatetime' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(clock_initialize.o): > > in function `clock_initialize': > > /home/ubuntu/Documents/nuttx/nuttx/sched/clock/clock_initialize.c:218: > > undefined reference to `up_timer_initialize' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(group_setupstreams.o): > > in function `group_setupstreams': > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_setupstreams.c:71: > > undefined reference to `fs_fdopen' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_setupstreams.c:72: > > undefined reference to `fs_fdopen' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/group/group_setupstreams.c:73: > > undefined reference to `fs_fdopen' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(mq_waitirq.o): > > in function `nxmq_wait_irq': > > /home/ubuntu/Documents/nuttx/nuttx/sched/mqueue/mq_waitirq.c:106: > > undefined reference to `up_unblock_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sem_trywait.o): > > in function `nxsem_trywait': > > /home/ubuntu/Documents/nuttx/nuttx/sched/semaphore/sem_trywait.c:88: > > undefined reference to `up_interrupt_context' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sig_timedwait.o): > > in function `nxsig_timedwait': > > /home/ubuntu/Documents/nuttx/nuttx/sched/signal/sig_timedwait.c:338: > > undefined reference to `up_block_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/sched/signal/sig_timedwait.c:355: > > undefined reference to `up_block_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sig_timedwait.o): > > in function `nxsig_timeout': > > /home/ubuntu/Documents/nuttx/nuttx/sched/signal/sig_timedwait.c:122: > > undefined reference to `up_unblock_task' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libsched.a(sig_allocpendingsigaction.o): > > in function `nxsig_alloc_pendingsigaction': > > /home/ubuntu/Documents/nuttx/nuttx/sched/signal/sig_allocpendingsigaction.c:69: > > undefined reference to `up_interrupt_context' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(net_sockets.o): > > in function `sockfd_allocate': > > /home/ubuntu/Documents/nuttx/nuttx/net/socket/net_sockets.c:134: > > undefined reference to `nxsched_get_sockets' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(net_sockets.o): > > in function `sockfd_socket': > > /home/ubuntu/Documents/nuttx/nuttx/net/socket/net_sockets.c:256: > > undefined reference to `nxsched_get_sockets' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(net_sockets.o): > > in function `sockfd_release': > > /home/ubuntu/Documents/nuttx/nuttx/net/socket/net_sockets.c:224: > > undefined reference to `nxsched_get_sockets' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_conn.o): > > in function `tcp_free': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_conn.c:790: undefined > > reference to `iob_free_queue' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_callback.o): > > in function `tcp_datahandler': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_callback.c:251: > > undefined reference to `iob_tryalloc' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_callback.c:260: > > undefined reference to `iob_trycopyin' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_callback.c:269: > > undefined reference to `iob_free_chain' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_callback.c:277: > > undefined reference to `iob_tryadd_queue' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_backlog.o): > > in function `tcp_backlogcreate': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_backlog.c:116: > > undefined reference to `zalloc' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_wrbuffer.o): > > in function `tcp_wrbuffer_release': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_wrbuffer.c:260: > > undefined reference to `iob_free_chain' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_wrbuffer.o): > > in function `tcp_wrbuffer_tryalloc': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_wrbuffer.c:226: > > undefined reference to `iob_tryalloc' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(udp_conn.o): > > in function `udp_free': > > /home/ubuntu/Documents/nuttx/nuttx/net/udp/udp_conn.c:631: undefined > > reference to `iob_free_queue' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(net_lock.o): > > in function `net_ioballoc': > > /home/ubuntu/Documents/nuttx/nuttx/net/utils/net_lock.c:514: undefined > > reference to `iob_tryalloc' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/net/utils/net_lock.c:527: undefined > > reference to `iob_alloc' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_notifier.o): > > in function `tcp_readahead_notifier_setup': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_notifier.c:109: > > undefined reference to `work_notifier_setup' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_notifier.o): > > in function `tcp_writebuffer_notifier_setup': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_notifier.c:165: > > undefined reference to `work_notifier_setup' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_notifier.o): > > in function `tcp_disconnect_notifier_setup': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_notifier.c:218: > > undefined reference to `work_notifier_setup' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_notifier.o): > > in function `tcp_notifier_teardown': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_notifier.c:244: > > undefined reference to `work_notifier_teardown' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_notifier.o): > > in function `tcp_readahead_signal': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_notifier.c:272: > > undefined reference to `work_notifier_signal' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_notifier.o): > > in function `tcp_writebuffer_signal': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_notifier.c:301: > > undefined reference to `work_notifier_signal' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libnet.a(tcp_notifier.o): > > in function `tcp_disconnect_signal': > > /home/ubuntu/Documents/nuttx/nuttx/net/tcp/tcp_notifier.c:324: > > undefined reference to `work_notifier_signal' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libc.a(lib_assert.o): > > in function `_assert': > > /home/ubuntu/Documents/nuttx/nuttx/libs/libc/assert/lib_assert.c:36: > > undefined reference to `up_assert' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libc.a(task_startup.o): > > in function `cxx_initialize': > > /home/ubuntu/Documents/nuttx/nuttx/libs/libc/sched/task_startup.c:108: > > undefined reference to `_sinit' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/libs/libc/sched/task_startup.c:108: > > undefined reference to `_einit' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/nuttx/libs/libc/sched/task_startup.c:108: > > undefined reference to `_stext' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libc.a(lib_printf.o): > > in function `printf': > > /home/ubuntu/Documents/nuttx/nuttx/libs/libc/stdio/lib_printf.c:44: > > undefined reference to `nxsched_get_streams' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libc.a(lib_abort.o): > > in function `abort': > > /home/ubuntu/Documents/nuttx/nuttx/libs/libc/stdlib/lib_abort.c:95: > > undefined reference to `pthread_exit' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libc.a(lib_syslog.o): > > in function `vsyslog': > > /home/ubuntu/Documents/nuttx/nuttx/libs/libc/syslog/lib_syslog.c:84: > > undefined reference to `nx_vsyslog' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /home/ubuntu/Documents/nuttx/hellocpp/nuttx-export-9.1.0/libs/libc.a(tls_getinfo.o): > > in function `tls_get_info': > > /home/ubuntu/Documents/nuttx/nuttx/libs/libc/tls/tls_getinfo.c:63: > > undefined reference to `nxsched_get_stackinfo' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg.a(lib_a-sbrkr.o): > > in function `_sbrk_r': > > /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m/nofp/newlib/libc/reent/../../../../../../../../newlib/libc/reent/sbrkr.c:51: > > undefined reference to `_sbrk' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg.a(lib_a-writer.o): > > in function `_write_r': > > /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m/nofp/newlib/libc/reent/../../../../../../../../newlib/libc/reent/writer.c:49: > > undefined reference to `_write' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg.a(lib_a-closer.o): > > in function `_close_r': > > /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m/nofp/newlib/libc/reent/../../../../../../../../newlib/libc/reent/closer.c:47: > > undefined reference to `_close' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg.a(lib_a-lseekr.o): > > in function `_lseek_r': > > /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m/nofp/newlib/libc/reent/../../../../../../../../newlib/libc/reent/lseekr.c:49: > > undefined reference to `_lseek' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg.a(lib_a-openr.o): > > in function `_open_r': > > /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m/nofp/newlib/libc/reent/../../../../../../../../newlib/libc/reent/openr.c:50: > > undefined reference to `_open' > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/bin/ld: > > /usr/lib/gcc/arm-none-eabi/9.2.1/../../../arm-none-eabi/lib/thumb/v7e-m/nofp/libg.a(lib_a-readr.o): > > in function `_read_r': > > /build/newlib-CVVEyx/newlib-3.3.0/build/arm-none-eabi/thumb/v7e-m/nofp/newlib/libc/reent/../../../../../../../../newlib/libc/reent/readr.c:49: > > undefined reference to `_read' > > collect2: error: ld returned 1 exit status > > make[2]: *** [src/CMakeFiles/hellocpp.dir/build.make:100: src/hellocpp] > > Error 1 > > make[1]: *** [CMakeFiles/Makefile2:94: src/CMakeFiles/hellocpp.dir/all] > > Error 2 > > make: *** [Makefile:84: all] Error 2 > > > > Does anybody have any idea of what am I doing wrong? > > > > Best regards, > > > > Flavio > > > > -- Flavio de Castro Alves Filho flavio.al...@gmail.com Twitter: http://twitter.com/#!/fraviofii LinkedIn profile: www.linkedin.com/in/flaviocastroalves