我是新的 ubuntu 用户并尝试安装gnu 打字员。我需要编译源代码来运行应用程序。根据文档,我需要 c 编译器来编译源代码。
我不知道如何编译源代码并开始在 ubuntu/linux 上使用该应用程序。
请帮我从 Windows 迁移到 ubuntu/linux?
Ubuntu 是否提供任何服务,自动将源代码编译为二进制 deb 包,以及用于多架构?
我发现很难在终端中运行/编译一个简单的 C++ 代码。这是我用来编译文件 (helloworld.cpp) 的代码。
g++ helloworld.cpp -o helloworld
Run Code Online (Sandbox Code Playgroud)
我收到一个错误。(图片)
我正在编译erld,一个将 Erlang 程序作为 UNIX 守护进程运行的程序,请参阅
https://github.com/ShoreTel-Inc/erld/wiki
我遵循的制作说明在这里:
https://github.com/ShoreTel-Inc/erld/blob/master/README
在make步骤中间有一个错误:
In file included from slay.c:25:0:
debug.h:41:6: warning: conflicting types for built-in
function ‘log’ [enabled by default]
slay.c:29:45: fatal error: proc/readproc.h: No such file or directory
compilation terminated.
make[1]: *** [erld-slay.o] Error 1
make[1]: Leaving directory `/home/ad/erld/c_src'
make: *** [all-recursive] Error 1
Run Code Online (Sandbox Code Playgroud)
这是 ubuntu 12.04 服务器 64:
$ uname -a
Linux lfe1 3.2.0-26-virtual #41-Ubuntu SMP Thu Jun 14 18:08:54 UTC 2012
x86_64 x86_64 x86_64 GNU/Linux
Run Code Online (Sandbox Code Playgroud)
我无法在这个问题中添加标签“erlang”。也许分数多的人可以做到。
不能./configure在我tar“从这里编Linux版本的:http://arduino.cc/en/Main/Software
尝试使用 Ubuntu 13.10 构建 Firefox OS 并收到此错误:
host SharedLib: libOpenglRender (out/host/linux-x86/obj/lib/libOpenglRender.so)
/usr/bin/ld: cannot find -lX11
/usr/bin/ld: cannot find -lX11
collect2: ld returned 1 exit status
make: *** [out/host/linux-x86/obj/lib/libOpenglRender.so] Error 1
Run Code Online (Sandbox Code Playgroud)
我的系统架构是 x86_64 和 GCC 4.6.3
当我编译以下代码时,它给出了编译错误
error: ‘for’ loop initial declarations are only allowed in C99 mode
for(int i = 0; i < 5; i++)
Run Code Online (Sandbox Code Playgroud)
并编译您的代码使用此选项:
note: use option -std=c99 or -std=gnu99 to compile your code
Run Code Online (Sandbox Code Playgroud)
现在我的问题是如何使用上述选项并启用 c99 和 c11?
我无法安装 lxml。在系统中,我有 python-lxml 包,但我需要其他包...请帮忙,如果可以的话 - 我的任务是安装 lxml 以使用 virtualenv 在虚拟环境中进行开发。我发现此解决方案已成功修复安装 lxml:
$ sudo apt-get install libxml2 libxml2-dev libxslt-dev build-essential python-dev
$ sudo ldconfig
Run Code Online (Sandbox Code Playgroud)
然后:
$ source bin/activate # for activate enviroment
(env) $ pip install lxml
Run Code Online (Sandbox Code Playgroud)
但是我有很多问题。
第一个问题是使用依赖项安装 build-essential -为什么 build-essential 失败?
解决了!谢谢!
接下来我有这个(输出):
(env) $ pip install lxml
...
i686-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-i686-2.7/src/lxml/lxml.etree.o -lxslt -lexslt -lxml2 -lz -lm -o build/lib.linux-i686-2.7/lxml/etree.so
/usr/bin/ld: …Run Code Online (Sandbox Code Playgroud) 我已经创建了一个简单的 c 程序,并省略了一个 ';' 故意得到一个错误。我想使用grep命令来知道编译是否成功。
我用:
gcc test.c | grep 'error'但输出似乎不对。这是正确的方法吗?
我认为它不起作用,因为这样做:
echo"hello world" | grep "hello"我得到了匹配的彩色文本。
在为编译做 grep 时,没有这样的事情。
错误具有以下形式:
test.c: In function ‘main’:
test.c:8:2: error: expected ‘,’ or ‘;’ before ‘return’
return 0;
^
Run Code Online (Sandbox Code Playgroud)
我使用的程序是:
int main(int argc, char const *argv[]){
char f[] = "Hello thereeee!"
return 0;
}
Run Code Online (Sandbox Code Playgroud) 我正在通过葡萄酒运行记事本++。但我无法编译程序(特别是 C++)。
有没有我可以使用的编译器?我该怎么办?
compiling ×10
c++ ×2
gcc ×2
apt ×1
c ×1
command-line ×1
firefox ×1
grep ×1
installation ×1
make ×1
python ×1
services ×1
virtualenv ×1