Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 05-19-2014, 06:09 PM   #1
LQ Newbie
Registered: May 2014
Posts: 2

Rep: Reputation: Disabled
Syntax error: "(" unexpected

I am developing an application for an embedded target running Linux 2.6.22. The application is written in C, compiled on Fedora 14 using g++ and runs just fine on Fedora 14.

However, when running on the target, it does not run at all - gives the syntax error: "(" unexpected.

Why won't it run on the target?

Old 05-19-2014, 06:14 PM   #2
Senior Member
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613Reputation: 613
likely a difference how the shell you are running your program from interprets meta characters, but it's pointless to speculate until you show us how you are running the command, the expected output, and what actually happens
Old 05-19-2014, 06:34 PM   #3
LQ Newbie
Registered: May 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
Here is the successful run time info from Fedora:
[root@linuxvm14 Test]# ./hello
Greetings ATC World!
[root@linuxvm14 Test]#

Here is the unsuccessful run time info from the target:
/atc # ./hello
./hello: ./hello: 6: Syntax error: word unexpected (expecting ")")
/atc #

and the source code:
#include <stdio.h>

using namespace std;

int main()

printf ("Greetings ATC World!\n" );

return 0;


Last edited by m.t.m; 05-19-2014 at 06:51 PM.
Old 05-25-2014, 11:01 AM   #4
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: win 10 | OpenBSD 6.1 | Fedora 26
Posts: 241

Rep: Reputation: 72
i received that error when i tried to run 32bit program in a 64bit system, installed multi libs and it went away.

not sure tho if this helps u.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
./project line 1 : Syntax error : unexpected word (expecting ")")... navya Linux - Newbie 29 05-01-2012 09:58 AM
i2c4: line1 : syntax error: unexpected word (expecting " )" ) pillisrikanth Linux - Software 1 12-07-2011 06:18 AM
[SOLVED] Shell Scripting "syntax error : unexpected end of file" roxie600 Programming 12 04-30-2010 12:18 AM
Backup Script error "line 31: syntax error: unexpected end of file" eswanepoel General 7 12-07-2007 09:28 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:04 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration