0

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

And I have used this command to compile myapp.c for angstrom

[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:

  1. 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.
    
  2. which packages or command will be used on the place of pkg-config --cflags gtk+-2.0 and pkg-config --libs gtk+-2.0 for angstrom.
  3. 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

geeta
  • 689
  • 3
  • 17
  • 33

2 Answers2

0

As for the third error: "gcc: error trying to exec 'cc1': execvp: No such file or directory", opkg update; opkg install cpp, fixed it for me.

Samuel
  • 8,063
  • 8
  • 45
  • 41
0

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

liberforce
  • 11,189
  • 37
  • 48
  • Thank you for your reply... I have tryied gcc –g –O3 mylib.a $(pkg-config --cflags --libs gtk+-2.0 gthread-2.0) myapp.c –o myapp as you told... now first three errors are not comming but last error:- arm-angstrom-linux-gnueabi-gcc: error trying to exec 'cc1': execvp: No such file or directory is still coming.Please tell me how to short out this one. – geeta Mar 21 '12 at 06:51
  • This might be related to an incorrect installation of you gcc for arm, and looks unrelated to GTK. Try searching on a search engine with the exact error message, and check that your gcc is able to compile a simple "hello world" app. – liberforce Mar 21 '12 at 09:10