
C++
longuby
喜欢运动
展开
-
常见编译错误
fatal error LNK1120 没有实现声明的函数或者使用外部变量但没有定义fatal error LINK2001 找不到函数实现 Warning C4251 由于以数据成员方式在DLL导出类中使用了模板类造成的 error C2039: “hash_map”: 不是“std”的成员 In vs2005,原创 2010-03-10 09:24:00 · 724 阅读 · 0 评论 -
VC常用函数
获取工作路径的函数:GetCurrentDirectory The GetCurrentDirectory function retrieves the current directory for the current process. DWORD GetCurrentDirectory( DWORD原创 2010-03-23 09:09:00 · 409 阅读 · 0 评论 -
创建dump文件方法
The actual implementation is straightforward. The following is a simple example of how to use MiniDumpWriteDump.#include #include #include int GenerateDump(EXCEPTION_POINTERS* pExceptionPo原创 2010-04-01 15:03:00 · 693 阅读 · 0 评论 -
关闭vs2005 Update Intellisense
There is a undocumented way to disable C++ Intellisense:Rename or delete the following /VC/vcpackages/feacp.dll转载 2010-04-01 15:07:00 · 1336 阅读 · 0 评论 -
C++中的const和mutable
C++中const所修饰的函数只能是类的成员函数,因为const所修饰的函数中,要由编译器负责保护类的成员变量不被修改。而相对的,mutable则是用来修饰类的成员变量,让该变量在const所修饰的成员函数中可以被修改。而且const修饰的函数只能是类的成员函数,mutable修饰的变量只能是类的成员变量。翻译 2010-04-21 09:44:00 · 471 阅读 · 0 评论 -
工程同时生成dll和lib文件
在工程上右键 -> 添加 -> 新建项 -> 选"模块定义文件(.def)" -> 随便输入个名字 -> 添加转载 2012-07-23 12:53:42 · 797 阅读 · 0 评论 -
GetProcAddress返回NULL
在编译DLL之后,原有的函数名会被进行名字处理而改变名称。 在dll中,导出函数之前加上 extern "C " , 比如: extern "C " __declspec(dllexport) void fnDll1(int tmp);转载 2012-07-23 13:25:09 · 3464 阅读 · 0 评论