简体   繁体   中英

SQLite compiling extension Windows x64 with mingw-w64

Specifically I am trying to compile the CSV virtual table extension . I followed the basic instructions here for mingw gcc, though I am using mingw-w64 gcc.

It compiles fine, but then gives this error trying to load it (via python 3.8 x64 SQLite3 library): The specified procedure could not be found

I have read this similar question , but I do not think it applies here as the CSV source does have the proper template for a SQLite extension and I have built it successfully in the past as a 32-bit DLL using mingw.

Has anyone successfully used mingw-w64 to build SQLite extensions or should I be looking at another compiler?

The answer provided on the SQLite forum is that there is nothing wrong with how I was compiling, but rather how I was loading it: on older versions of SQLite, load_extension expects to have forward-slashes in the path to the dll, not backslashes.

There are also detailed recommendations for what gcc flags to use, so if you are having similar issues, take a look at that forum post.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM