现在的位置: 首页 > 综合 > 正文

VC++调试OCCI程序的关键设置

2013年12月04日 ⁄ 综合 ⁄ 共 525字 ⁄ 字号 评论关闭

#define WIN32COMMON
//解决error C2995: 'getVector' : template function has already been defined

#include <occi.h>
using namespace oracle::occi;

#pragma comment(lib,"oci.lib")
#pragma comment(lib,"ociw32.lib")
#pragma comment(lib,"oraocci10.lib")

//解决无法调试OCCI的问题
//参考sdk\demo目录下的make.bat

对于VS2003:
1.项目属性 -> C/C++ -> 代码生成 -> 运行时库 -> 多线程调试 DLL (/MDd)
2.项目属性 -> 链接器 -> 输入 -> 附加依赖项 -> msvcrt.lib msvcprt.lib

对于VC++6.0
1.Project Settings -> C/C++ -> Code Generation -> Use run-time library: -> Debug Multithreaded DLL
2.Project Settings -> Link -> Object/library modules:末尾添加
msvcrt.lib msvcprt.lib 

抱歉!评论已关闭.