简单的c程序不会在linux中编译,得到奇怪的错误

时间:2016-09-20 10:13:18

标签: c linux unix gcc

我的编译器是pooched。我正在尝试编写一个简单的" Hello World"程序在c和我得到这个错误:

ld: warning: directory not found for option '-    F/System/Library/Frameworks/'
ld: unknown option: -plugin
collect2: error: ld returned 1 exit status

谷歌搜索错误不断给我链接以帮助MAC OS。我的电脑正在运行Ubuntu 16.04。

这来自having this error before并实施其解决方案或安装clang并删除usr / local / bin / as。编译器仍然不会编译,但错误现在是前面提到的。

我试图编译的程序:

/* Hello World program */

#include<stdio.h>

int main()
{
    printf("Hello World");

}

uname -m命令带回x86_64。作为-version运行带回来:

GNU assembler (GNU Binutils for Ubuntu) 2.26.1
Copyright (C) 2015 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License version 3 or later.
This program has absolutely no warranty.
This assembler was configured for a target of `x86_64-linux-gnu'.

值得我尝试为iOS编译python程序。在尝试编译器工作之前。我需要做些什么来修复编译器?

1 个答案:

答案 0 :(得分:0)

阅读错误:

ld: warning: directory not found for option '- F/System/Library/Frameworks/' ld: unknown option: -plugin collect2: error: 
ld returned 1 exit status ld doesn't know option -plugin. 

查看链接对象的命令。并且该目录可能不存在。