vs2008如何编译完整的System.Data.SQLite.dll,继上一贴引出的疑问,共200分

witchman___ 2009-06-03 09:04:18
用c#.net操作sqlite会用到System.Data.SQLite.dll,网上例子很多。
我为了解决汉字字符编码问题,详细见上一贴http://topic.csdn.net/u/20090601/11/9EDB203E-AE0E-41D8-B21F-CD6147F31408.html需要修改System.Data.SQLite.dll源代码。现在在vs2008环境下,自己在编译System.Data.SQLite.dll的时候,编译能通过,但是生成的System.Data.SQLite.dll就168K比官方的少了大几百K,检查一下是少了文件夹SQLite.Interop里面的内容。运行open数据库时候,在sqlite3.cs line112 UnsafeNativeMethods之前没有加载到SQLite.Interop.dll而为空出错,请教大家vs2008如何编译完整的System.Data.SQLite.dllSystem.Data.SQLite下载地址http://sqlite.phxsoftware.com
...全文
2780 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
spiderman_0 2012-05-31
  • 打赏
  • 举报
回复
楼主 在么 很急 想要一个你做好的 读取GBK字符集的 System.Data.SQLite dll 文件
xuahua 2009-06-04
  • 打赏
  • 举报
回复
正在使用中,谢谢分享!
witchman___ 2009-06-03
  • 打赏
  • 举报
回复
[Quote=引用 8 楼 Dobzhansky 的回复:]
Debug 编译是 两个 dll,
Release 编译进行了合并, 是一个 dll


作者自己写了一个工具用来合并两个 dll, 一个是纯 win32 dll, 一个是程序集 dll,
合并后的 dll 同时可以被 C 客户端使用, 也可以被托管代码使用.


这个技术也可以学习下, 很强大.
[/Quote]
原来如此,学习了,谢谢你!!!
Dobzhansky 2009-06-03
  • 打赏
  • 举报
回复
Debug 编译是 两个 dll,
Release 编译进行了合并, 是一个 dll


作者自己写了一个工具用来合并两个 dll, 一个是纯 win32 dll, 一个是程序集 dll,
合并后的 dll 同时可以被 C 客户端使用, 也可以被托管代码使用.


这个技术也可以学习下, 很强大.
witchman___ 2009-06-03
  • 打赏
  • 举报
回复
To Dobzhansky

原来SQLite.Interop Platform默认设置的是x64,怪不得怎么也编译不出来,现在好了可以用了.
但是我还有个小疑问,为什么我编译出来的是两个dll,官方的是一个,是因为Description="Merging binaries ..."CommandLine="..\bin\tools\mergebin.exe 参数设置的原因吗,我如何将两个dll拼一起去。
Dobzhansky 2009-06-03
  • 打赏
  • 举报
回复
这个是 SQLite.Interop.vcproj 工程文件中的,

是通过 工程属性窗口中设置的, 不过也可以自己编辑这个工程文件.

你比较一下 Debug / Relese 两个版本的设置, 就看出来了
witchman___ 2009-06-03
  • 打赏
  • 举报
回复
To Dobzhansky
大哥,你说的<Tool 。。。/>在什么地方设置啊
Dobzhansky 2009-06-03
  • 打赏
  • 举报
回复
Release 的:

<Tool
Name="VCPostBuildEventTool"
Description="Merging binaries ..."
CommandLine="..\bin\tools\mergebin.exe /S:.clr ..\System.Data.SQLite\bin\$(TargetFileName) "$(TargetPath)" sn -Ra "$(TargetPath)" ..\System.Data.SQLite\System.Data.SQLite.snk "
/>


Debug 的:

<Tool
Name="VCPostBuildEventTool"
CommandLine=""
/>

feifeiyiwen 2009-06-03
  • 打赏
  • 举报
回复
等待高手..........
Dobzhansky 2009-06-03
  • 打赏
  • 举报
回复
System.Data.Sqlite 的 Debug 编译, inteop 跟 程序集是分离的, Release 编译时才用 mergebin 工具合并的.

你可以修改一下两者都 merge 呀
yan286093636 2009-06-03
  • 打赏
  • 举报
回复
等待高手..........

110,561

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧