LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 05-19-2014, 07:09 PM   #1
m.t.m
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?

MTM
 
Old 05-19-2014, 07:14 PM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,808

Rep: Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604Reputation: 604
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, 07:34 PM   #3
m.t.m
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 07:51 PM.
 
Old 05-25-2014, 12:01 PM   #4
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: tri boot :: Fedora 22 && 23 && Rawhide == Testing Systemd
Posts: 222

Rep: Reputation: 50
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.
 
  


Reply


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 10:58 AM
i2c4: line1 : syntax error: unexpected word (expecting " )" ) pillisrikanth Linux - Software 1 12-07-2011 07:18 AM
[SOLVED] Shell Scripting "syntax error : unexpected end of file" roxie600 Programming 12 04-30-2010 01:18 AM
Backup Script error "line 31: syntax error: unexpected end of file" eswanepoel General 7 12-07-2007 10:28 AM


All times are GMT -5. The time now is 09:49 PM.

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