通过Makefile来安装已编译过的代码的命令是()。

题目

通过Makefile来安装已编译过的代码的命令是()。

  • A、make
  • B、install
  • C、make depend
  • D、make install
如果没有搜索结果或未解决您的问题,请直接 联系老师 获取答案。
相似问题和答案

第1题:

以下关于C#代码的说法正确的是()publicabstractclassAnimal{publicabstractvoidEat();publicvoidSleep(){}}

A、代码编译错误,因为类中方法没有实现

B、代码编译错误,因为类中存在非抽象方法

C、该段代码正确

D、通过代码”Animalan=newAnimal();”可以创建一个Animal对象


参考答案:C

第2题:

阅读下面代码 class Test implements Runnable { public int run() { int i=0; while(true) { i++; System.out.println("i="+i); } } } 上述代码的编译结果是

A.程序通过编译,并且run()方法可以正常输出递增的i值

B.程序通过编译,调用run()方法将不显示任何输出

C.程序不能通过编译,因为while的循环控制条件不能为true

D.程序不能通过编译,因为run()方法的返回值类型不是void


正确答案:D

第3题:

阅读下列代码段

Class Test implements Runnable {

Public int run( ) {

Int i = 0;

While (true) {

i++;

System.out.println ( “ i= ” +i);

}

}

}

上述代码的编译结果是

A )程序通过编译并且 run () 方法可以正常输出递增的 i 值

B )程序通过编译,调用 run () 方法将不显示任何输出

C )程序不能通过编译,因为 while 的循环控制条件不能为 “ true ”

D )程序不能通过编译,因为 run () 方法的返回值类型不是 void


正确答案:D

 

第4题:

编写一个文件的程序,使用Makefile文件进行编译。


正确答案: (1)利用文本编辑器创建hello.c文件。
//hello.c
#include
intmain()
{
printf("WelcomeEmdoor!/n");
return1;
}
(2)编写Makefile文件。
#makefiletestforhelloprogram
CC=gcc
CFLAGS=
all:hello
hello:hello.o
$(CC)$(CFLAGS)hello.o–ohello
hello.o:hello.c
$(CC)$(CFLAGS)-chello.c-ohello.o
clean:
rm–rfhello*.o
(3)执行make命令,编译hello.c程序。
[root@local]$make

第5题:

在一个应收帐款系统中,内部审计师发现源代码和可行性模块不一致,能够减少这种情况发生的控制是()。

  • A、需要通过对授权的源代码进行编译来更新可执行模块
  • B、强制使用分开的开发库和生产库
  • C、源代码变更需要管理层授权
  • D、为源代码库安装访问控制程序

正确答案:A

第6题:

通过Makefile来安装已编译过的代码的命令是()。

A.make

B.install

C.make depend

D.make install


正确答案:D

第7题:

阅读下列代码段。上述代码的编译结果是( )。

A.程序通过编译并且run( )方法可以正常输出递增的i值

B.程序通过编译,调用run( )方法将不显示任何输出

C.程序不能通过编译,因为while的循环控制条件不能为“true”

D.程序不能通过编译,因为run( )方法的返回值类型不是void


正确答案:D
while的循环控制条件可以为true,run()方法没有返回值,所以不能是int型,故此程序不能通过编译。

第8题:

如果你试图编译下面的代码会发生什么事? Class MyString extends String{ }

A.代码编译成功

B.代码不能编译,因为没有定义一个main()方法

C.代码不能编译,因为String是abstract类型的

D.代码不能编译,因为String是final类型的


正确答案:D

第9题:

编写多个文件的程序,并使用Makefile文件进行编译。


正确答案: (1)在/work目录先新建一个hello2目录,并在该目录下用vi命令创建文件hello1.c、hello2.c、hello.h和Makefile。分别输入如下内容。
文件hello1.c
//hello1.c
#include
intmain()
{
printf("WelcomeEmdoor!/n");
test2();
return1;
}
文件hello2.c
//hello2.c
#include"hello2.h"
#include
voidtest2(void)
{
printf("WelcomeEmdoor!–hello2/n");
}
文件hello2.h
//hello2.h
voidtest2(void);
文件makefile
#makefiletestformultifilesprogram
CC=gcc
OFLAGS=
OBJS=hello1.ohello2.o
all:hello
hello:$(OBJS)
$(CC)$(CFLAGS)$^-o$@
hello1.o:hello1.c
$(CC)$(CFLAGS)-c$<-o$@
hello2.o:hello2.c
$(CC)$(CFLAGS)-c$<-o$@
clean:
rm-rfhello*.o
(2) 先后执行如下命令
[root@local]$make
[root@local]$./hello

第10题:

()是一个为编译Qt/Embedded库和应用而提供的Makefile生成器,它支持()和影子生成。


正确答案:Qmake;跨平台开发

更多相关问题