2012年8月3日

在C#中调用C++编写的dll

摘要: 有C++dll,实现了int Sum(int a,int b);则在C#中可以这样使用:View Code 1 using System; 2 using System.Collections.Generic; 3 using System.Text; 4 5 using System.Runtime.InteropServices;//引入dll文件中的函数 6 7 namespace ConsoleDllDemo 8 { 9 class Program10 {11 //引入dll文件中的函数12 [DllImport("dllDemo.dl... 阅读全文

posted @ 2012-08-03 14:53 ActiveChange 阅读(159) 评论(0) 推荐(0) 编辑

Windows下通过VC6编译SQLite源代码

摘要: 1.下载SQLite源代码。http://www.sqlite.org/sqlite-amalgamation-3071300.zip2.创建Win32 Dll Library工程,在工程中加入sqlite3.c, sqlite3.h, sqlite3.def。(sqlite3.def加入工程的Resource Files中)编译,出现以下链接错误:View Code Linking...sqlite3.def : error LNK2001: unresolved external symbol sqlite3_column_database_namesqlite3.def : error 阅读全文

posted @ 2012-08-03 10:56 ActiveChange 阅读(504) 评论(0) 推荐(0) 编辑

在VC6下使用SQLite

摘要: 1.下载Windows版本的SQLite二进制库文件http://www.sqlite.org/download.html下载后解压得到:sqlite3.dll sqlite3.def,并没有提供用于VC6的lib文件。我们可以用sqlite3.def文件生成。2.生成sqlite3.lib文件打开命令行,切换目录到sqlite3.def库文件所在的目录,运行如下命令:LIB /MACHINE:IX86 /DEF:sqlite3.def运行后,生成:sqlite3.lib和sqlite3.exp3.新建控制台程序。将sqlite3.dll, sqlite3.lib, sqlite3.h文件放到 阅读全文

posted @ 2012-08-03 10:47 ActiveChange 阅读(2697) 评论(0) 推荐(0) 编辑

导航