I have compiled my application on Linux (Intel) machine using this command gcc –g myapp.c –O3 –o myapp mylib.a ‘pkg-config –cflags gtk+-2.0’ ‘pkg-config –libs gtk+-2.0 gthread-2.0’ myapp is running successfully on Linux machine.
Now I want to compile myapp for Angstrom (A Linux version running on Beagleboard).
So I am using angstrom-2011.03-i686-linux-armv7a-linux-gnueabi-toolchain (is a cross-compiler for angstrom) cross-compiler to compile myapp.I have set path successfully using this command
./usr/local/angstrom/arm/environment-setup
[root@acmemsys internetTV_partialDecoding]# ./arm-angstrom-linux-gnueabi-gcc -g myapp.c -O3 -o myapp mylib.a 'pkg-config --cflags gtk+-2.0' 'pkg-config --libs gtk+-2.0 gthread-2.0'
Errors:
arm-angstrom-linux-gnueabi-gcc: mylib.a: No such file or directory
arm-angstrom-linux-gnueabi-gcc: pkg-config --cflags gtk+-2.0: No such file or directory
arm-angstrom-linux-gnueabi-gcc: pkg-config --libs gtk+-2.0 gthread-2.0: No such file or directory
arm-angstrom-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
So want to ask that:
How this error will be removed
arm-angstrom-linux-gnueabi-gcc: mylib.a: No such file or directory
Note:- mylib.a is a library used for myapp.
And why this Error
arm-angstrom-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory
is coming.
Please help me to short out this problem.
Thanks in advance
You're not using the right quotes character: ` is different from '
Use the $(command) variant if you prefer.
Afterwards, check that pkg-config --cflags --libs gtk+-2.0
returns what you expect.
You may also need to fix you arguments order (end with the -o
part).
To sum up, try this: gcc –g –O3 mylib.a $(pkg-config --cflags --libs gtk+-2.0 gthread-2.0) myapp.c –o myapp