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

一个C++调用C的例子

//cExample.h
#ifndef C_EXAMPLE_H
#define C_EXAMPLE_H
#ifdef __cplusplus
extern "C"
{
#endif
int add(int x, int y);
#ifdef __cplusplus
}
#endif
#endif
---------------------------------
//cExample.c
#include"cExample.h"
int add(int x, int y)
{
 return x + y;
}
---------------------------------
//cppFile.cpp
#include <iostream>
#include"cExample.h"
using namespace std;
main()
{
    cout<<add(2,3)<<endl;
    return 0;
}
--------------------------------
//makefile
cppFile: cppFile.o cExample.o
    g++ -g -o cppFile cppFile.o cExample.o
cppFile.o: cppFile.cpp
    g++ -g -c cppFile.cpp
cExample.o: cExample.c cExample.h
    gcc -g -c cExample.c
clean:
    rm -f *.o cppFile


相关文档:

c sharp 无法调用dll

原来是被调用的dll又调用了其他的dll
第二个dll忘记了考到工作目录下
导致了c sharp一直没能加载dll。报错:找不到dll
现在想起来,所谓的dll找不到,应该是找不到第二个dll
消耗时间2个小时,心情稍微有点受影响 ......

使用VMware构建快采调试环境(C/S结构)

操作步骤:
1.物理机安装VMWare,在虚拟机中安装Windows XP Professional + SP2
2.VM->Install VMware Tools...
3.在VMware主界面双击Ethernet,并选定Host-only选项
4.在物理机网络连接中,设置VMware Network Adapter VMnet1的IP地址为:130.0.0.50,子网掩码:255.255.0.0,其余为空,作为操作站使用。同时禁用VM ......

使用NDK开发C/C++项目规则(ZT)

使用NDK开发C/C++项目规则
<!-- /* Font Definitions */ @font-face {font-family:宋体; panose-1:2 1 6 0 3 1 1 1 1 1; mso-font-alt:SimSun; mso-font-charset:134; mso-generic-font-family:auto; mso-font-pitch:variable; mso-font-signature:3 135135232 16 0 262145 0;}@font-face {font-family:"\@宋体&qu ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号