SQLite3.dll for x64

流过昼夜 提交于 2019-12-24 07:35:48

问题


From the download sqlite.org/download, they provide Precompiled Binaries for Windows for both x86 and x64. So, what gets downloaded is a .def file and a .dll file. Using this two files you can create the .lib file. [Command: lib /def:yourfile.def /out:yourfile.lib]

On creating the .lib file and using it as a dependency, things are working fine for x86. But for x64, Visual Studio is showing the error:

LNK4272: library machine type 'X86' conflicts with target machine type 'x64'

Is anyone else facing this?


回答1:


Found out where I was going wrong.

While creating the .lib file, we should be using the following command: lib /def:sqlite3.def /machine:X64 /out:sqlite3.lib

I was skipping the /machine:X64 option before. Better to see what are all the options provided by a command.

Example: lib /?

The output will be:

usage: LIB [options] [files]

  options:

  /DEF[:filename]
  /ERRORREPORT:{NONE|PROMPT|QUEUE|SEND}
  /EXPORT:symbol
  /EXTRACT:membername
  /INCLUDE:symbol
  /LIBPATH:dir
  /LIST[:filename]
  /LTCG
  /MACHINE:{ARM|ARM64|EBC|X64|X86}
  /NAME:filename
  /NODEFAULTLIB[:library]
  /NOLOGO
  /OUT:filename
  /REMOVE:membername
  /SUBSYSTEM:{BOOT_APPLICATION|CONSOLE|EFI_APPLICATION|
              EFI_BOOT_SERVICE_DRIVER|EFI_ROM|EFI_RUNTIME_DRIVER|
              NATIVE|POSIX|WINDOWS|WINDOWSCE}[,#[.##]]
  /VERBOSE
  /WX[:NO]


来源:https://stackoverflow.com/questions/42623284/sqlite3-dll-for-x64

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!