易截截图软件、单文件、免安装、纯绿色、仅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交叉编译


相关文档:

linux 0.11 内核学习 asm.s,机器难免出故障。


/*
 *  linux/kernel/asm.s
 *
 *  (C) 1991  Linus Torvalds
 */
/*
 * asm.s contains the low-level code for most hardware faults.
 * page_exception is handled by the mm, so that isn't here. This
 * file also handles (hopefully) fpu-exceptions ......

linux 0.11 内核学习 sched.c,调度进程。


/*
 * 2010-1-21
 * 该文件时内核中有关任务调度的函数程序,其中包含基本函数sleep_on,
 * wakeup,schedule等,以及一些简单的系统调用。同时将软盘的几个操作
 * 函数也放置在这里。
 * 
 * schedule函数首先对所有的任务检查,唤醒任何一个已经得到信号的任务,
 * ......

C++调用JAVA方法详解

http://public0821.javaeye.com/blog/423941
C++调用JAVA主要用到了SUN公司的JNI技术, JNI是Java Native Interface的 缩写。从Java 1.1开始,Java Native Interface (JNI)标准成为java平台的一部分,它允许Java代码和其他语言写的代码进行交互。相关资料见http://java.sun.com/j2se/1.5.0/docs/guide/jni/spec/jniTOC.htm ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号