`

CodeBlocks+MinGW编译OCI

阅读更多

1、安装codeblocks-10.05-setup,安装路径为"C:\CodeBlocks";
2、安装tdm-gcc-4.5.2,路径为"C:\CodeBlocks\MinGW32";
3、下载instantclient-sdk-nt-11.2.0.2.0.zip,解压,将include目录下的头文件复制到路径"C:\CodeBlocks\MinGW32\include";
4、下载pexports-0.43.zip,解压,将pexports.exe复制到路径"C:\CodeBlocks\MinGW32\bin";
5、下载instantclient-basic-nt-11.2.0.2.0.zip,解压,将oci.dll复制到路径"C:\CodeBlocks\MinGW32\bin";
6、导出def。命令:

C:\CodeBlocks\MinGW32\bin>pexports oci.dll > oci.def

7、生成a文件。命令:

C:\CodeBlocks\MinGW32\bin>dlltool --dllname oci.dll --def oci.def --output-lib liboci.a

8、用CobdBlocks创建项目,并在"Project->Porperties->Project's build options->Linker settings->link libraries"里添加liboci.a。
9、配置完毕!

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics