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

Linux shared library Loading function

Link from: http://www.faqs.org/docs/Linux-mini/C++-dlopen.html
//1. == main.cpp =============================================
// How to build?
// g++ -o main main.cpp -ldl
//=======================================================
#include <iostream>
#include <dlfcn.h>
int main() {
    using std::cout;
    using std::cerr;
    cout << "C++ dlopen demo\n\n";
    // open the library
    cout << "Opening hello.so...\n";
    void* handle = dlopen("./hello.so", RTLD_LAZY);
    if (!handle) {
        cerr << "Cannot open library: " << dlerror() << '\n';
        return 1;
    }
    // load the symbol
    cout << "Loading symbol hello...\n";
    typedef void (*hello_t)();
    hello_t hello = (hello_t) dlsym(handle, "hello");
    if (!hello) {
        cerr << "Cannot load symbol 'hello': " << dlerror() <<
            '\n';
        dlclose(handle);
        return 1;
    }
    // use it to do the calculation
    cout << "Calling hello...\n";
    hello();
    // close the library
    cout << "Closing library...\n";
    dlclose(handle);
}
// 2=====hello.cpp ========================================
// How to build?
// g++ -c -fPIC hello.cpp
// g++ -shared  -o hello.so
-fPIC hello.o
//======================================================
#include <


相关文档:

linux开机启动服务详解(RH系)

http://179401.cn/read.php?21
acpid
配置文件:/proc/acpi/event
默认端口:无
说明:Advanced Configuration and Power Interface,为替代传统的APM 电源管理标准而推出
的新型电源管理标准。
是否需要启动:如果你需要对电源进行管理,那就需要启动。
anacron
配置文件:/etc/anacron
默认端口:无
说明:一个 ......

[转]linux: 学习linux/unix编程方法的建议

首先先学学编辑器,vim, emacs什么的都行。
然后学make file文件,只要知道一点就行,这样就可以准备编程序了。
然后看看《C程序设计语言》K&R,这样呢,基本上就可以进行一般的编程了,顺便找本数据结构的书来看。
如果想学习UNIX/LINUX的编程,《APUE》绝对经典的教材,加深一下功底,学习《UNP》的第二卷。这样基 ......

linux or unix 常用命令

快捷键:ctrl+c ctrl+d
1.shell 分为图形shell和命令shell 命令shell分为bash和csh,切换到csh用csh,exit返回bash
2.telnet 远程登陆unix
telnet 192.168.0.25
login:hz0904 用户名
password:sd0904 密码规则:6-8个字符,至少包含字母以及1个数字,不能与登录名相同
3.passwd: 修改密码>输入现有口令>输入 ......

Linux/Unix 常用命令一

一、df
1.作用
df命令用来检查文件系统的磁盘空间占用情况,使用权限是所有用户。
2.格式
df [options]
3.主要参数
-s:对每个Names参数只给出占用的数据块总数。
-a:递归地显示指定目录中各文件及子目录中各文件占用的数据块数。若既不指定-s,也不指定-a,则只显示Names中的每一个目录及其中的各子目录所占的 ......

Linux发行版比较

CentOS 如果你喜欢RH的产品,而你又讨厌FC4的臃肿,那么尝试一下CentOS吧,当你打开这个发行版的时候,相信你会大叫一声:"这不就是Redhat么",是的,这个版本完全使用RH的srpm生成系统,而且性能也很不错。
Debian 这个发行版本在所有发行版本里面堪称最严谨的,apt软件包管理机制可以让用户快速建立起来高效的操作系统。 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号