Closed GillesC closed 4 years ago
Allright, the readme is not really noob-friendly. I'll try to make a PR based on the experience of installing and building your Nim project.
That may be true, but check the GitHub Actions, it builds from scratch step by step on every push, and they wont use any very advanced OS specific tools, just Git, Curl, etc you can get Windows version of those too. Besides that, most people is using Docker nowadays.
We expand functionality and readme as time goes, some stuff has been requested by people on the past. :slightly_smiling_face:
I installed nim.
I executed : nim c --hint[Processing]:off --app:lib --out:faster_than_csv.dll faster_than_csv.nim
So now I have a *.dll
file. How can I now use the generated file in Python?
Not *.dll
, must be *.pyd
, readme says that.
Not
*.dll
, must be*.pyd
, readme says that.
Yeah OK, but the screenshot shows something else.
*.pyd
can be just imported, put it on the same folder as the *.py
and is ready.
Example folder has examples, also requested by people.
I compiled from source as:
nim c --app:lib --threads:on --out:faster_than_csv.pyd src/faster_than_csv.nim
Hint: used config file 'C:\Users\Calle\scoop\apps\nim\current\config\nim.cfg' [Conf]
Hint: used config file 'C:\Users\Calle\Downloads\faster-than-csv-master\faster-than-csv-master\src\faster_than_csv.nim.cfg' [Conf]
Hint: system [Processing]
Hint: widestrs [Processing]
Hint: io [Processing]
Hint: faster_than_csv [Processing]
Hint: parsecsv [Processing]
Hint: lexbase [Processing]
Hint: strutils [Processing]
Hint: parseutils [Processing]
Hint: math [Processing]
Hint: bitops [Processing]
Hint: macros [Processing]
Hint: algorithm [Processing]
Hint: unicode [Processing]
Hint: streams [Processing]
Hint: json [Processing]
Hint: hashes [Processing]
Hint: tables [Processing]
Hint: parsejson [Processing]
Hint: options [Processing]
Hint: typetraits [Processing]
Hint: os [Processing]
Hint: pathnorm [Processing]
Hint: osseps [Processing]
Hint: winlean [Processing]
Hint: dynlib [Processing]
Hint: times [Processing]
Hint: time_t [Processing]
Hint: osproc [Processing]
Hint: strtabs [Processing]
Hint: cpuinfo [Processing]
Hint: xmltree [Processing]
Hint: punycode [Processing]
Hint: httpclient [Processing]
Hint: net [Processing]
Hint: nativesockets [Processing]
Hint: sets [Processing]
Hint: monotimes [Processing]
Hint: openssl [Processing]
Hint: uri [Processing]
Hint: base64 [Processing]
Hint: mimetypes [Processing]
Hint: random [Processing]
Hint: httpcore [Processing]
Hint: asyncnet [Processing]
Hint: asyncdispatch [Processing]
Hint: heapqueue [Processing]
Hint: lists [Processing]
Hint: asyncstreams [Processing]
Hint: asyncfutures [Processing]
Hint: deques [Processing]
Hint: cstrutils [Processing]
Hint: asyncfile [Processing]
Hint: diff [Processing]
Hint: nimpy [Processing]
Hint: complex [Processing]
Hint: py_types [Processing]
Hint: py_utils [Processing]
Hint: py_lib [Processing]
Hint: sequtils [Processing]
Hint: [Link]
Hint: operation successful (94891 lines compiled; 3.732 sec total; 110.906MiB peakmem; Dangerous Release Build) [SuccessX]
And added the DLLs (they were already there).
However, when importing the .pyd
, I get the following:
could not load: (libcrypto-1_1-x64|libeay64).dll
.
Reinstalling OpenSSL worked. So in the end it is more than 2 lines of codes.
Thank you.
Great, yes is kinda not too complicated, you learn something new today, yes usually the DLL are already there too, you solved problem pretty quickly. :slightly_smiling_face:
Platform: Windows 10 (64-bit) Python version: 3.8