Syntax error: “(” unexpected

前端 未结 2 1144
闹比i
闹比i 2021-01-22 18:17

I am trying to compile code using gcc and run the executable, but it is throwing error:

gcc somefile.c -o somefile

compilation goes through su

相关标签:
2条回答
  • 2021-01-22 18:51

    your somefile is executable binary, it's not shell script. you should execute it by:

    $./somefile
    
    0 讨论(0)
  • 2021-01-22 18:52

    To execute file you just have to do

    $./somefile

    sh is used when you've to execute a shell script

    0 讨论(0)
提交回复
热议问题