Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
All support for Intel NUC 7 - 13 systems has transitioned to ASUS. Read latest update.
12583 Discussions

Crosscompiling PCAP Application for uClinux

Altera_Forum
Honored Contributor II
1,893 Views

Hello all, 

 

Has anybody succeeded (or tried) to cross-compile a basic pcap application for uClinux? 

 

AFAIK, it is not already included with uClinux, and needs to be compiled separately, is that also right? 

 

Thanks, 

Turhan
0 Kudos
6 Replies
Altera_Forum
Honored Contributor II
379 Views

pcap as in libpcap/tcpdump/wireshark? libpcap and tcpdump are included in uClinux-dist. I had to update to the latest versions for it to work though.

0 Kudos
Altera_Forum
Honored Contributor II
379 Views

Thank you very much for your answer Yuri.  

 

How did you cross-compile your code then? 

Normally I would compile a pcap appliation# gcc main.c -lpcap 

In order to have it working in uclinux on nios2, I run# nios2-linux-gnu-gcc main.c -lpcap 

 

and quite reasonably, I get the error: pcap.h No such file or directory. 

 

Any suggestions?
0 Kudos
Altera_Forum
Honored Contributor II
379 Views

If you're building outside the uClinux-dist tree, you need to provide the directories where the headers and libraries are with -I and -L

0 Kudos
Altera_Forum
Honored Contributor II
379 Views

Yuri, could you please describe how to compile my own software within the uClinux-dist tree? Everytime I start thinking I am getting literate in Linux, I realize I am far from it. 

 

Thanks.
0 Kudos
Altera_Forum
Honored Contributor II
379 Views
0 Kudos
Altera_Forum
Honored Contributor II
379 Views

Thanks Michael =)

0 Kudos
Reply