GCC出现 "cannot execute binary file"

今天开始搞搞Linux 开发 用Gcc -c test.c -o test 感觉挺标准的

先是出现一句./test: Permission denied  没权限 加个权限去

然后 使用 chmod +x test

再次执行结果./test: cannot execute binary file

纳闷了

百度结果是 gcc 如果加参数 -c 是只编译 不连接 去掉后就好了

gcc test.c -o test

./test  

直接执行

猜你喜欢

转载自crackren.iteye.com/blog/2240700
今日推荐