Ⅰ Ubuntu10.04 下面不知道该字体哪儿来,现在打开“终端”,字体显示有点问题,字符宽度不一致。
sudo vim /etc/default/console-setup
将其中的 CODESET FONTFACE FONTSIZE改了就行。
一般推荐:
CODESET="Hebrew"
FONTFACE="VGA"
FONTSIZE="16"
=================================================
建议你使用下面的字体,漂亮大方:
http://www.wuche.cc/operatingsystems/linux/2010/0818/5559.html
Ⅱ ubuntu 驱动编译无法通过 求神来解决
复制代码
1 #ifndef __KERNEL__
2 # define __KERNEL__
3 #endif
4 #ifndef MODULE
5 # define MODULE
6 #endif
7
8 // 下面的是主要的内容
9 #include <linux/kernel.h>
10 #include <linux/mole.h>
11 #include <linux/init.h>
12
13 MODULE_LICENSE("GPL");
14
15 static int year=2012;
16
17 int hello_init()
18 {
19 printk(KERN_WARNING "Hello kernel, it's %d!\n",year);
20 return 0;
21 }
22
23
24 void hello_exit()
25 {
26 printk("Bye, kernel!\n");
27 }
28
29 // 下面两个为关键的模块函数
30 mole_init(hello_init);
31 mole_exit(hello_exit);
复制代码
如果上面的代码看起来不太熟悉,那么需要查看以下相关的书籍,比如《Linux设备驱动程序,第三版》,也就是大名鼎鼎的LDD;
2、老式驱动模块编译方法:
直接写出make规则到makefile文件中,引用内核体系的头文件路径,举例如下:
复制代码
1 # The path of kernel source code
2 INCLUDEDIR = /media/GoldenResources/linux/linux-2.6.30/include
3
4 # Compiler
5 CC = gcc
6
7 # Options
8 CFLAGS = -D__KERNEL__ -DMODULE -O -Wall -I$(INCLUDEDIR)
9
10 # Target
11 OBJS = hello.o
12
13 all: $(OBJS)
14
15 $(OBJS): hello.c
16 $(CC) $(CFLAGS) -c $<
17
18 install:
19 insmod $(OBJS)
20
21 uninstall:
22 rmmod hello
23
24 .PHONY: clean
25 clean:
26 rm -f *.o
复制代码
这里有我是用的一个linux内核源代码路径:/media/GoldenResources/linux/linux-2.6.30/include ,注意设置到正确的源码路径。
尝试这编译:
复制代码
$make
gcc -D__KERNEL__ -DMODULE -O -Wall -I/media/GoldenResources/linux/linux-2.6.30/include -c hello.c
In file included from /media/GoldenResources/linux/linux-2.6.30/include/linux/kernel.h:11:0,
from hello.c:8:
/media/GoldenResources/linux/linux-2.6.30/include/linux/linkage.h:5:25: fatal error: asm/linkage.h: No such file or directory
compilation terminated.
make: *** [hello.o] Error 1
复制代码
Ⅲ ubuntu qt creator 无法编译,编译按钮灰色
按着这个步骤来:
1、新建空的工程helloword.pro,最好选择带控制台的
2、在工程里面添加源文件,命名main.cpp
3、然后在main.cpp文件里面写入你的main函数即可。
Ⅳ linux ubuntu (12.10)编译问题!求大神速解决!急!急!急!
你的gcc有没有正确安装啊?而且还用12.10,这么高档
Ⅳ ubuntu下code::block无法编译c++文件
没发现g++,也就gcc中的c++编译器
原因有二:
1、你没装gcc(这个应该不会的,ubuntu是自带的)
2、codeblock没有侦测到你的g++,可以setting-->Compiler and debugger setting --> Toolchain executables设置就可以,点击Auto--detect
Ⅵ ubuntu 10.04软件编译问题
你./configure没有成功,缺少依赖库文件。
需要totem-pl-parser 2.21.4 或以上。
可以试一下一下的命令:
sudo apt-get install libtotem-plparser-dev libtotem-plparser10
如果还有提示那个error的话就是要找更新的totem-pl-parser,另外还有什么error都贴上来
Ⅶ Ubuntu 15.10 下安装codeblocks 总是不能编译,试了各种方法,求大神指导啊。
我平时用geany,不用codeblocks,刚才安装了一下,能正常编译。下面是这是我的步骤。
一、编译工具有没有安装:
用下面的命令看看
gcc--version
找不到gcc就安装这个
sudoapt-getinstallbuild-essential
二、怎么安装的codeblocks
我用这个命令安装的
sudoapt-getinstallcodeblocks
三、操作是否正确
首先,建立项目
新建一个文件(Create a new project)
选择Empty project
填写项目名称,保存的目录
选择编译器GNU GCC Compiler
然后,新建文件
点击左上角的新建文件,新建一个empty file,文件名改为main.cpp。
提示是否添加到项目,选择是。
这一步,点击ok。
写代码。
#include<iostream>
intmain(){
std::cout<<"helloworld!!!"<<std::endl;
}
最后,保存文件,快捷键Ctrl+s,并编译。
先点击工具栏上的齿轮,build项目。
然后点击旁边的三角形运行。
然后有个黑色的shell窗口弹出,显示结果。
四、不喜欢要怎么卸载
sudoapt-getpurgecodeblocks
sudoapt-getautoremove