LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Syntax error: "(" unexpected (https://www.linuxquestions.org/questions/linux-newbie-8/syntax-error-unexpected-4175505492/)

m.t.m 05-19-2014 06:09 PM

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

AlucardZero 05-19-2014 06:14 PM

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

m.t.m 05-19-2014 06:34 PM

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;

}

////// 05-25-2014 11:01 AM

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.


All times are GMT -5. The time now is 06:55 AM.