0

使用这个:

g++ -c -Wall -l libuthreads.a test02-new.cc -o test02-new

我正在编译我的代码。

在尝试使用 : test02-new 执行代码时,我得到:

test02-new: Permission denied.

你知道它的原因是什么吗?我以前用过这个命令。

4

1 回答 1

2

如果使用该-c标志,GCC 会输出一个目标文件。你不能执行这些。

这应该有效:

$ g++ -Wall libuthreads.a test02-new.cc -o test02-new
$ ./test02-new
于 2013-04-10T17:18:41.120 回答