Friday, July 4th 2008, 10:45pm UTC+1

You are not logged in.

  • Login
  • Register

1

Wednesday, January 16th 2008, 2:26pm

cannot execute binary file

I have configured qtopia with the -embedded bfin option, which is required for running my applications on blackfin boards under embedded linux. When I compile my programs with the commands
$ qmake -project
$ qmake -o Makefile project.pro
$ make

All the applications I get are about 7Mb size, which is far too big. The programs I have started to compile are very simple, so I must be doing something wrong.

Also, those files I get are not executable because when I try to execute them I get the message

PHP Source code

1
bash: ./programcannot execute binary file


Both problems must be related, but I don't know how to get small executable files.

One example of a program that I try to compile correctly is one of the tutorials:

Source code

1
2
3
4
5
6
7
8
9
10
11
12
#include <qapplication.h>
#include <qpushbutton.h>

int main( int argc, char **argv )
{
    QApplication a( argc, argv );

    QPushButton hello( "Hello world!", 0 );
    hello.resize( 100, 30 );
    hello.show();
    return a.exec();
}
  • Go to the top of the page

_mosg_

Beginner

Posts: 1

Location: Russia, Moscow

Occupation: Developer

2

Sunday, February 24th 2008, 1:16pm

RE: cannot execute binary file

I have the same error on openSUSE 10.3 + Qt 4.3.3... but can`t find the solution after about a few hours spending on Internet.
  • Go to the top of the page

3

Sunday, March 2nd 2008, 12:13am

RE: cannot execute binary file

In my case, since I was using the -embedded option I could not run my applications in the board where my applications are embedded. To solve that problem I had to download the applications to the board and change the permissiones of the executable file using the chmod 755 command. When the permissions were changed I could run the application. (Well, I had to download the libraries too because now I use shared applications).

If you are not using the -embedded configuration option you´ll have to use the qvfb (see the documentation where says how to install it).

Finally, there was another way to run the applications using X11 but I can´t remember how.
  • Go to the top of the page

Rate this thread