Skip to content

C syntax error near unexpected token `('

Shuang0420 edited this page Jun 8, 2016 · 1 revision

问题

$ sudo gcc -I/usr/local/lib/python2.7.11 -o inferDocVec inferDocVec.c -lpython2.7
$ ./inferDocVec.c
./inferDocVec.c: line 5: syntax error near unexpected token `('
./inferDocVec.c: line 5: `void test1(){'

原因

这不是编译问题,而是shell的错误,因为系统把这个文件当作了shell文件来运行

解决

$ ./inferDocVec

[[TOC]]

Clone this wiki locally