LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   ./hello: 1: Syntax error: word unexpected (expecting ")") (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/hello-1-syntax-error-word-unexpected-expecting-4175425245/)

madhav024 08-28-2012 12:30 PM

./hello: 1: Syntax error: word unexpected (expecting ")")
 
hi i have cross compiled the sample program (which contains simple printf statement) for ARM architecture and when i run this executable program its showing below error can some one help me in getting out of this.
./hello: 1: Syntax error: word unexpected (expecting ")")


Regards,
Madhav.

theNbomr 08-29-2012 08:58 AM

It is considered bad form to hijack a thread. You should start your own thread.
Having said that, I would suggest that you make sure your executable program really is that. What is the result of
Code:

file ./hello
If it doesn't specifically state that it is ARM object code, then you've probably done something wrong in compiling and moving the executable to the target architecture. It sounds very much like you're trying to execute a C source file.
--- rod.

[EDIT] Looks like the mods have started a new thread for you

me011089 09-02-2012 02:49 AM

Hi madhav,
It seems like you didn't crosscompiled it correctly,please make sure that you've got an arm executable by typing 'file <executable bame>',(I got the error because my compilation was not complete,i.e, I just made an object file ,I fixed it after cross compiling it with proper option to generate executable)

madhav024 09-09-2012 04:33 AM

ya thanks for the information, there was a minor mistake as i used -c option while compilation which resulted in generating only object file, so i was trying to execute this so i got the error.
thanks for the information.

Regards,
Madhav.


All times are GMT -5. The time now is 03:19 AM.