Hello,
I'm trying to build a c module with cffi, but for some reason the compiler always looks for a .lib file instead of my .dll file (pcre2.dll):
LINK : fatal error LNK1181: cannot open input file 'pcre2.lib'
Below is my code for the build (API mode):
from cffi import FFI
ffibuilder = FFI()
ffibuilder.cdef("""
char * mdtokenizer_build(char *text, struct mdtokenizer_info **token_info);
void mdtokenizer_free(struct mdtokenizer_info **token_info);
""")
ffibuilder.set_source("_md_token", # name of the output C extension
"""
#include "markdown.h"
#include "nodelist.h"
#include "regexapi.h"
#include "regexfts.h"
#include "pcre2.h"
#include "pcre2posix.h"
""",
sources=['markdown.c', 'nodelist.c','regexapi.c','regexfts.c'],
libraries=['pcre2','pcre2posix'])
if __name__ == "__main__":
ffibuilder.compile(verbose=True)
Is there any way to tell cffi to look for a dll instead of a lib.
thx