易截截图软件、单文件、免安装、纯绿色、仅160KB

Linux下C和C++开发基础

Linux下C和C++开发基础
基本编程概念
n 编程语言:C 、C++
n 编译(compile):源文件(.c)->目标文件(.o)
n 连接(link):目标文件(.o)->可执行文件
n 库(library):静态连接库(.a)、动态连接库(.so)
Linux下开发工具
n编辑器:vi、emacs、窗口编辑器
n编译器:GCC
n调试器:GDB
n可执行文件工具:Binutils
n连接器:ld
n汇编程序:as
n库管理工具:ar
n可执行文件符号管理:nm
n显示可执行文件信息:objdump
简单程序示例(C语言):
n hello.c
/***************************
C代码
#i nclude <stdio.h>   
int main(int argc,char **argv)   
{   
printf("HelloWorld!\n");   
return 0;   
}   
/***************************   
n编译方法:gcc –o hello hello.c   
n运行方法:./hello   
简单程序示例(C++语言):  
#i nclude <stdio.h>
int main(int argc,char **argv)
{
printf("HelloWorld!\n");
return 0;
}
/***************************
n编译方法:gcc –o hello hello.c
n运行方法:./hello
简单程序示例(C++语言):
n hello.cpp
/*******************************
C代码
#i nclude <iostream>   
using namespace std;   
int main(int argc,char **argv)   
{   
cout << "Hello World!“ << endl;   
return 0;   
}  
#i nclude <iostream>
using namespace std;
int main(int argc,char **argv)
{
cout << "Hello World!“ << endl;
return 0;
}
/*******************************
n 编译方法:g++ –o hello hello.cpp
n 运行方法:./hello
GCC编译器
n GNU平台下主流编译器
n目前最新稳定版4.0
n官方网站:http://gcc.gnu.org
n支持编译语言:C、C++、Objective-C、
Objective-C++、Java、Fortran、Ada
n跨平台支持:支持几乎所有主流操作系统,如
Linux、UNIX、Windows等。支持多种硬件平
台,如X86、ARM、PPC、MIPS等
n交叉编译


相关文档:

航空公司管理系统(VC++ 与SQL 2005)

系统环境:Windows 7
软件环境:Visual C++ 2008 SP1 +SQL Server 2005
本次目的:编写一个航空管理系统
      这是数据库课程设计的成果,虽然成绩不佳,但是作为我用VC++ 以来编写的最大程序还是传到网上,以供参考。用VC++ 做数据库设计并不容易,但也不是不可能。以下是我的程序界面,后面 ......

写得蛮好的linux学习笔记(转)


linux目录架构
/   根目录
/bin    常用的命令 binary file 的目錄
/boot   存放系统启动时必须读取的档案,包括核心 (kernel) 在内
     /boot/grub/menu.lst   GRUB设置
   ......

linux spi驱动

linux spi驱动
内核版本:linux-2.6.29
 
主要的几个结构
platform_device platform_driver s3c24xx_spi spi_master spi_bitbang spi_device spi_driver spidev_data s3c_spi_info
第一步:注册platform_device
在arch/arm/mach-s3c2410/mach-qt2410.c 中注册platform_device ,其中s3c2410_spi_info 作为plat ......

c++编写html文件解析器

      最近本来是要去那嵌入式课的,但是那课竟然说人数太少,开不了,靠。所以这两天只能自己研究点东西了。记得自己以前就想动手写一个关于dom的解析引擎,只怪自己太懒,一直没动笔。最近在家也没什么事做,就自己动手写一个,花了一天时间写的差不多了,正好锻炼自己的c++水平吧。
 &nb ......

C字符串处理函数的实现(Linux)

C字符串处理函数的实现(Linux)
#include <stddef.h>
char * ___strtok = NULL;

char * strcpy(char * dest,const char *src)
{
char *tmp = dest;

while ((*dest++ = *src++) != '\0')
/* nothing */;
return tmp;
}

char * strncpy(char * des ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号