在vc.net中的C/C++代码生成DLL步骤
1 选择new->project->win32 console project;
在这一步的选框上有一个选项是 create dictionary for solution, 我不知道这个具体是什么作用,选了之后会项目出现两层文件夹,比如你创建一个命名为test的项目,会生成test文件夹,test中包含另一个test文件夹,你的项目实际上放在了内层test文件夹中。选与不选对于后续的创建没有影响。这个的具体作用等我查明白了再补上!
2 输入你的文件名字->按下next->选择DLL->选择OK;
3 在工程中添加一个与工程名字同名的test.h文件,在文件中写入代码: extern "C" __declspec(dllexport) void testexam(char *input); (文件名字是需要导出的文件名);
4 在cpp文件的头上其他include语句后面,添加#include "test.h",在其中写入你的函数void testexam(char *input);
5 在build->batch build 中将两个选项都选中,然后选择这个选项框中的编译指令
OK, now you can get your dll and lib file in the release and debug file folder! Congratulations !
相关文档:
本文来自:Linux教程 -- http://doc.linuxpk.com/53295.html
如有不明白之处,欢迎参加社区讨论
1.Linux“线程”
笔者曾经在《基于嵌入式操作系统VxWorks的多任务并发程序设计》(《软件报》2006年第5~12期)中详细叙述了进程和线程的区别,并曾经说明Linux是一种“多进程单线程”的操作系统。 ......
在这儿下载:color-theme
:
http://download.savannah.gnu.org/releases-noredirect/color-theme/
wget http://download.savannah.gnu.org/releases-noredirect/color-theme/color-theme-6.6.0.tar.gz
tar zxf color-theme-6.6.0.tar.gz -C ~/.emacs.d
在.emacs中加入下列语句:
;; corlor-theme ......
http://www.mathworks.com/access/helpdesk/help/techdoc/apiref/mexfunction.html
mexFunction (C and Fortran) -
Entry point to C/C++ or Fortran MEX-file
C Syntax
#include "mex.h"
void mexFunction(int nlhs, mxArray *plhs[], int nrhs,
const mxArray *prhs[]);
Fortran
Syntax
subrouti ......