Reply
Thread Tools
Posts: 3 | Thanked: 0 times | Joined on Jun 2009 @ Finland
#1
Hello Maemo Forum.

I'm new with Meamo C++ development. I don't know how to run my gcc compiled hello world application. Application is very simple "hello word" and works fine in Ubuntu. I copy binary file to N810 but when trying to run it I get an error message:

$ ./hello
/.hello: line 1: syntax error: "(" unexpected


Hopefully you can advice me.
Cheers!
 
pycage's Avatar
Posts: 3,404 | Thanked: 4,474 times | Joined on Oct 2005 @ Germany
#2
This looks a lot like you're trying to run the C++ source code file instead of the compiled program.
 

The Following User Says Thank You to pycage For This Useful Post:
qwerty12's Avatar
Posts: 4,274 | Thanked: 5,358 times | Joined on Sep 2007 @ Looking at y'all and sighing
#3
Originally Posted by jjoikkonen View Post
Hello Maemo Forum.

I'm new with Meamo C++ development. I don't know how to run my gcc compiled hello world application. Application is very simple "hello word" and works fine in Ubuntu. I copy binary file to N810 but when trying to run it I get an error message:

$ ./hello
/.hello: line 1: syntax error: "(" unexpected


Hopefully you can advice me.
Cheers!
Run "file" on it and post its output here.

I suspect that you're trying to run a x86 binary (simply because I've seen that message before with running binaries for different archs and it "works fine in Ubuntu").

Last edited by qwerty12; 2009-06-29 at 08:55.
 
Posts: 3 | Thanked: 0 times | Joined on Jun 2009 @ Finland
#4
Hi. Thanks for reply

$ ./hello
/.hello: line 1: syntax error: "(" unexpected

This is the output from the device. More info. I use gcc -compiler. Compile output:

gcc hello.c -o hello
 
Posts: 882 | Thanked: 1,310 times | Joined on Mar 2007
#5
Like qwerty said, you need to compile it for the device in scratchbox or similar. Tablet has no x86 cpu so you can't just copy it to device and expect it to run.
 

The Following User Says Thank You to ukki For This Useful Post:
Posts: 3 | Thanked: 0 times | Joined on Jun 2009 @ Finland
#6
Yeah, you're right. Thanks for advice.

But for my surprise I still got the same error when compiled the file on sracthbox for both ARM and X86. Works fine in scratchbox but not in device... Same output

Could I be missing some pre-installation plugins?

EDIT:
I found out that ARM build is working fine on my another N810. Thanks for advices! I try to figure out what's wrong with the another device.

Cheers

Last edited by jjoikkonen; 2009-06-29 at 11:58. Reason: edit
 
Reply


 
Forum Jump


All times are GMT. The time now is 09:08.