要在ubuntu下学C++程序,就必须装C++的编译环境,所以要装个gcc,gcc是一套编译器,可以编译c,c++, Fortran,Pascal,Objective-C,Java,等很多语言,下面看下怎么使用gcc。
加入在 /home/tinguys/c 下建立hello.c,内容为:#include
int main(void)
{
printf("hello,world!\n");
return 0;
}
打开 终端 输入 gcc -Wall /home/tinguys/c/hello.c -o hello
-Wall参数的作用是程序错误时发出警告。
-o hello是根据代码生成一个可执行文件,并命名为hello,因为没有说明路径,这个可执行文件将建在原程序所在的文件夹内。
接着输入 ./hello
就会输出 hello,world!
2009年1月30日
在ubuntu下编c++程序
ubuntu pocket guide and reference
装ubuntu也有好些天了,过年的繁琐事不断,在电脑上的时间远没有我想的那么多,也一直没有完成我的预期的目标。
- 装LAMP
- 建立c++编译环境,gcc+vim
《ubuntu pocket guide and reference》听名字应该适合初学者,不过是E文,看不下来阿。这书包含7章:
- 第一章:安装Ubuntu(Chapter 1:Installing Ubuntu)
- 第二章:配置Ubuntu(Chapter 2:Configuring Ubuntu)
- 第三章:熟悉桌面(Chapter 3:Getting to grips with the desktop)
- 第四章:用户和文件系统(Chapter 4:Users and the filesystem)
- 第五章:命令行上手(Chapter 5:Hands-on at the command-line)
- 第六章:软件管理(Chapter 6:Software management)
- 第七章:系统安全(Chapter7:Securing the system)
2009年1月28日
apache 问题
tinguys@tinguys-desktop:~$ apache2 -k graceful
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
httpd not running, trying to start
(13)Permission denied: make_sock: could not bind to address 0.0.0.0:80
no listening sockets available, shutting down
Unable to open logs
tinguys@tinguys-desktop:~$ sudo /etc/init.d/apache2 restart
[sudo] password for tinguys:
* Restarting web server apache2 apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
apache2: Could not reliably determine the server's fully qualified domain name, using 127.0.1.1 for ServerName
[ OK ]
tinguys@tinguys-desktop:~$
2009年1月27日
卓为 情人眼 315 驱动 下载
很早时候买的摄像头(右图),找出来继续发挥余热,不过130万像素还不如手机。现在500万像素的摄像头都不过百,考虑下是不是该升级了。
传感器类型 CMOS
传感器像素(万)130
最高分辨率(dpi)640×480
我找的这个是64位的驱动,安装后可行,64位不是cpu的位数,而是摄像头程序的位数,


