Moto Hell - The Motorola Modding Community
November 22, 2024, 11:52:14 pm *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: The forum is no longer active and registration is disabled; however you can still fetch everything as guest.
 
   Home   Help Facebook Search Calendar Login Register  
Pages: [1] 2   Go Down
  Print  
Author Topic: [E2] Crosscompiling in Linux  (Read 12337 times)
BlinK_
Guest
« on: June 04, 2008, 07:12:49 am »

As I succeeded to telnet to my E2 from linux, first thing to do, is to configure crosscompiler. (:

I ran into one problem. When I try to make, I get following error:
Quote
Assembler messages:
Error: unknown cpu `iwmmxt'
cc1plus: error: bad value (iwmmxt) for -mtune= switch
cc1plus: error: bad value (iwmmxt) for -mcpu= switch

I get the same error if I use blackhawk's or lasly's SDK. Does anyone know what is the problem?
Logged
NestorM
Guest
« Reply #1 on: June 04, 2008, 07:27:25 am »

I have not any problem crosscompiling in linux, but I don't work in telnet.
Logged
BlinK_
Guest
« Reply #2 on: June 04, 2008, 07:37:33 am »

Then how do you do it? Can you share your configured crosscompiler?
Logged
ilove3d
Guest
« Reply #3 on: June 05, 2008, 11:19:10 pm »

http://ezxdev.org/arm-linux.tar.bz2
Logged
BlinK_
Guest
« Reply #4 on: June 06, 2008, 03:50:21 am »

Thank you very much. It worked with lasly's SDK.

Now when I have a binary file, I need to place it on my mobile. How can I do it on linux? I can telnet to my moblile, but I don't know how to put files in it.

EDIT: Found out how to easily put files on E2 from linux. We have samba! (: In your linux box just type
Quote
smbclient //192.168.16.2/system
and you are on your mobile. Commands for smbcleint are pretty much the same as in FTP client.

If anyone knows another method of how to manage files on mobile through linux, please share.

EDIT2: Even better. You can mount E2 system just like this:
Quote
sudo mount -t smbfs //192.168.16.2/system /mnt/system
« Last Edit: June 06, 2008, 06:30:23 am by BlinK_ » Logged
BlinK_
Guest
« Reply #5 on: June 09, 2008, 02:00:17 am »

I have a problem compiling any sources with MyDialog object. I tried mkpgTool, VMemory and other sources and all of them failed to compile. Even this simple program:
Quote
#include <E2_EZX_ZApplication.h>
#include <E2_EZX_ZKbMainWidget.h>
#include <stdio.h>

class MyDialog : public ZKbMainWidget
{
   Q_OBJECT
public:
   MyDialog() : ZKbMainWidget((ZHeader::HEADER_TYPE)3, NULL, "ZMainWidget", 0)
   {
      printf("woohoo");
   }
};

int main(int argc, char **argv)
{
   ZApplication* app = new ZApplication(argc, argv);
   MyDialog* dlg = new MyDialog();

   app->setMainWidget(dlg);
   dlg->show();
   app->exec();

   delete dlg;
   delete app;

   return 0;
}

shows the same error when compiled.

Quote
martynas@martynas-desktop:~/e2sdk/lasly/band$ make -f Makefile
/home/martynas/e2sdk/lasly/bin/moc band.cpp -o band.moc
arm-linux-g++ -c -pipe -DQWS -fno-exceptions -fno-rtti -Wall -W -O2 -DNO_DEBUG -I/home/martynas/e2sdk/lasly/include -o band.o band.cpp
arm-linux-gcc  -o makefile band.o   -L/home/martynas/e2sdk/lasly/lib -lm -lqte-mt -lipp-codecJP -lezxappbase -lipp-miscGen -lezxpm -lipp-jp
band.o(.text+0xd4): In function `main':
: undefined reference to `vtable for MyDialog'
collect2: ld returned 1 exit status
make: *** [makefile] Error 1
martynas@martynas-desktop:~/e2sdk/lasly/band$

Can anyone help?
Logged
arctu
Guest
« Reply #6 on: June 09, 2008, 04:13:06 am »

u didn't follow fully the instructions provided by lasly. that's all I can say. i'm not gonna spoon feed. =x
Logged
NestorM
Guest
« Reply #7 on: June 09, 2008, 05:30:18 am »

me too Smiley
Logged
BlinK_
Guest
« Reply #8 on: June 09, 2008, 08:08:37 am »

Both of you are not acting nice. (: I guess, I am calling for help, not "spoon feed". If you do not have anything to say, then do NOT say it.

As for my problem, I guess it has something to do with a helloworld.moc file. It is included in every source file from lasly's SDK. I tried to generate moc file from my program source file, and then include it in the end. Then my program compiled but when I ran it, it gave me segmentation fault.
Logged
arctu
Guest
« Reply #9 on: June 09, 2008, 09:12:12 am »

I told you... I do not want to spoon feed.. and I even gave you a hint.. u didn't follow fully the instructions provided by lasly =="

i first learn how to compile apps for E2 by COMPLETELY FOLLOWING HIS INSTRUCTIONS. hmm.. i wonder if you even read his readme?
Logged
BlinK_
Guest
« Reply #10 on: June 09, 2008, 10:55:52 am »

Yea. I read the readme file from lasly's SDK. I did everything what was said there.

There was not even a word about moc files. An I haven't found any moc file in SDK archive.
Logged
arctu
Guest
« Reply #11 on: June 09, 2008, 06:40:39 pm »

then read on qt 2.3 next.. =p

oh well.. lasly provided 2 perl script with his sdk... progen and tmake. You only need to use those to create a Makefile which have instructions to create the moc file.  if your source codes uses classes inhereting from qwidget and its variants, a *.moc file with the name of your source code will be generated at compilation. you can include the moc file in your source with "#include "nameofyourmoc.moc". That will fix the undefined table problem.

and btw.. with lasly's sdk.. u don't do
Quote
martynas@martynas-desktop:~/e2sdk/lasly/band$ make -f Makefile
you only need progen and tmake. follow lasly's instructions. if you use make, moc wont be generated. Tongue
Logged
BlinK_
Guest
« Reply #12 on: June 09, 2008, 11:10:10 pm »

As I said, I followed lasly's HOWTO. And there is written about progen, tmake and make.

Progen generates pro file, which contains information about your source, header files and other.

Tmake generates makefile from pro file. It doesn't compile anything,

And then make compiles the program by following instructions from makefile.

Including moc file fixed the vtable bug. But when compiled, this program spits out segmentation fault.
Quote
#define QT_NO_DRAGANDDROP
#define QT_NO_PROPERTIES

#include <E2_EZX_ZKbMainWidget.h>
#include <E2_EZX_ZApplication.h>
#include <stdio.h>

class MyDialog : public ZKbMainWidget
{
   Q_OBJECT
public:
   MyDialog::MyDialog( ) : ZKbMainWidget((ZHeader::HEADER_TYPE)3, NULL, "ZMainWidget", 0)
   {
      printf("Woohoo");
   }
};

int main(int argc, char **argv)
{
   ZApplication* app = new ZApplication(argc, argv);
   MyDialog* dlg = new MyDialog();

   //app->setMainWidget(dlg);
   //dlg->show();
   app->exec();

   delete dlg;
   delete app;

   return 0;
}

#include "band.moc"

Segmentation fould occurs when I uncomment
Quote
MyDialog* dlg = new MyDialog();
line. I also tried to compile mkpgTools by lasly, and it compiles with no problems. But when I tried to run it, it also gave me a seg fault.
« Last Edit: June 09, 2008, 11:11:46 pm by BlinK_ » Logged
arctu
Guest
« Reply #13 on: June 09, 2008, 11:30:48 pm »

Ahh.. My mistake on the make part..

I tell u what... Try compiling a simple hello world program without qt stuff and see if the program could run on ur phone..
Logged
BlinK_
Guest
« Reply #14 on: June 10, 2008, 12:26:30 am »

Yes it can. I wrote some classes without Qt and everything was fine. As I said, If i comment
Quote
MyDialog* dlg = new MyDialog();
then everything is fine.
Logged
Pages: [1] 2   Go Up
  Print  
 
Jump to:  

Design By Forum Hosting
Powered by SMF 1.1.21 | SMF © 2015, Simple Machines