Author Topic: Help Compiling For Z  (Read 1835 times)

Ostots

  • Newbie
  • *
  • Posts: 6
    • View Profile
Help Compiling For Z
« on: June 23, 2005, 05:54:17 pm »
Hello,
I am trying to compile an app for Z and later I want modifi the app for me...

I have downloaded :
http://mirror1.pdaxrom.org/archive/rc5/pda...ftfloat.tar.bz2
and untar this at /opt/arm

to compile from source code dir I do this:
$ /opt/arm/runzgcc-vfp.sh
pdaXrom cross developer tools 1.1.0 softfloat(VFP)
Type 'exit' for leave shell.

Cross prefix is 'armv5tel-linux-'

Predefined variables:
X11INC - X11 include path
X11LIB - X11 libraries path
QTDIR  - QT basedir path

sh-3.00$

in this shell I exec this lines:
sh-3.00$ cat makeme
#!/bin/sh
armv5tel-linux-gcc inetflash.c -o inetflash -lpcap
armv5tel-linux-strip inetflash


then I have these errors:
sh-3.00$ ./makeme
inetflash.c:4:18: pcap.h: No such file or directory
inetflash.c:25: warning: `struct pcap_pkthdr' declared inside parameter list
inetflash.c:25: warning: its scope is only this definition or declaration, which is probably not what you want
inetflash.c: In function `main':
inetflash.c:53: error: `PCAP_ERRBUF_SIZE' undeclared (first use in this function)
inetflash.c:53: error: (Each undeclared identifier is reported only once
inetflash.c:53: error: for each function it appears in.)
inetflash.c:54: error: `pcap_t' undeclared (first use in this function)
inetflash.c:54: error: `descr' undeclared (first use in this function)
inetflash.c:56: error: storage size of `hdr' isn't known
inetflash.c:62: warning: assignment makes pointer from integer without a cast


These are my questions: What I must to do? cp my pcap.h to somewhere at /opt/arm... ?
and what means "-lpcap" at armv5tel-linux-gcc command?

Thanks!
« Last Edit: June 23, 2005, 05:55:23 pm by Ostots »
Sharp Zaurus SL-C700
pdaXrom 1.1.0 RC10
Buffalo "WLI2-CF-S11" 802.11b Wifi card
Dane-elec 128Mb SD

Stubear

  • Hero Member
  • *****
  • Posts: 1164
    • View Profile
    • http://
Help Compiling For Z
« Reply #1 on: June 23, 2005, 08:22:44 pm »
"-lpcap" tells the gcc compiler that it should include the pcap shared library in the the program (technically it doesn't include it just makes pointers to the shared library functions) to get these functions pcap.h needs to be available for the complier and libpcap.so needs to be available for the linker.

.h files are normally found in the /include or /usr/include folder - not sure of the exact set up for the pdax sdk

Stu
SL-C1000, Hand converted to English with Japanese Input
Running X apps via X/Qt
iRiver USB host cable; Diatec P-Cord usb power cable (extendable); Acro's Reel Cable USB (A to A, B, Mini-B,  & Mini-B 8pin); GreenHouse 1Gb PicoDrive+; 2x256Mb Hagiwara SD cards; 128Mb Transcend CF card; 512Mb PQI CF card; AmbiCom WL1100C-CF 11B WLAN card