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

【理论知识篇】Linux混合编程+log4cpp


     由于要使用到log4cpp的库,而log4c的资料是非常的少,也懒得去研究它的用法,于是就决定试试混合编程者玩意。
      首先先引用下C++它的father: Stroustrup的一篇文章《C++ Style and Technique FAQ》(http://www2.research.att.com/~bs/bs_faq2.html)里的一小个片段:
Just declare the C function ``extern "C"'' (in your C++ code) and call it (from your C or C++ code). For example:
// C++ code
extern "C" void f(int); // one way
extern "C" { // another way
int g(double);
double h();
};
void code(int i, double d)
{
f(i);
int ii = g(d);
double dd = h();
// ...
}
The definitions of the functions may look like this:
/* C code: */
void f(int i)
{
/* ... */
}
int g(double d)
{
/* ... */
}
double h()
{
/* ... */
}
Note that C++ type rules, not C rules, are used. So you can't call function declared ``extern "C"'' with the wrong number of argument. For example:
// C++ code
void more_code(int i, double d)
{
double dd = h(i,d); // error: unexpected arguments
// ...
}
Just declare the C++ function ``extern "C"'' (in your C++ code) and call it (from your C or C++ code). For example:
// C++ code:
extern "C" void f(int);
void f(int i)
{
// ...
}
Now f() can be used like this:
/* C code: */
void f(int);

void cc(int i)
{
f(i);
/* ... */
}
Naturally, this works only for non-member functions. If you want to call member functions (incl. virtual functions) from C, you need to provide a simple wrapper. For example:
// C++ code:
class C {
// ...
virtual double f(int);
};
extern "C" double call_C_f(C* p, int i) // wrapper function
{
return p->f(i);
}
Now C::f() can be used like this:
/* C code: */
double call_C_f(struct C* p, int i);

void ccc(struct C* p, int i)
{
double d = call_C_f(p,i);
/* ... */
}
If you want to call overloaded functions from C, you must provide wrappers with distinct names for th


相关文档:

在Linux上安装Redmine与apache整合进行项目管理


安装
SVN
这个比较简单,去
这里下载源码
http://subversion.tigris.org/
 
自己编译下装好就是了。
对于
SVN
的配置,建议查看如下连接,说的很详细,我也不在多说哈
~
http://www.ibm.com/developerworks/cn/java/j-lo-apache-subversion/#N10250
不过,有一点,上边说的进行目录访问控制
,这个比较 ......

Linux虚拟内存基础知识

1.从80386开始,Intel处理器的线性32被分为3个域,最高十位为此线性地址在页目录的索引;中间十位为此线性地址在页表中的索引;最低12为物理地址的低12位(也可以说是页内偏移量)。每个进程一定有各自独立的页表(注意:这里说的是进程,而不是线程。在linux里线程其实就是轻量级的进程,他们是连页目录都相同的进程,只是 ......

Linux的权限

一个用户、一个组
我们来看一看 Linux权限和所有权模型。我们已经看到每个文件属于一个用户和一个组。这正是Linux 中权限模型的核心。您可以在 ls -l清单中查看用户和组:
$ ls -l /bin/bash
-rwxr-xr-x 1 root wheel 430540 Dec 23 18:27 /bin/bash
在这个特殊的示例中,/bin/bash 可执行文件属于root 用 ......

VMWare里Linux使用MINICOM实现与开发板的通讯(转)

最近在一些嵌入式开发群里面或者论坛上看见一些朋友在讨论怎么在虚拟机里面使用minicom与开发板通讯,毕竟还有好多像我这样在虚拟机里面用Linux的朋友。下面的方法仅是本人暂时使用并且还能行得通的方法,希望大家还能找到更好的方法,不过别忘了也给小弟通知一下啊,记得开源精神哦,
开始之前先说一下自己的系统 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号