diff options
-rw-r--r-- | doc/tut2.txt | 2 | ||||
-rw-r--r-- | lib/wrappers/mysql.nim | 14 |
2 files changed, 10 insertions, 6 deletions
diff --git a/doc/tut2.txt b/doc/tut2.txt index 2948713e4..b9fff93b9 100644 --- a/doc/tut2.txt +++ b/doc/tut2.txt @@ -640,7 +640,7 @@ Macros Macros enable advanced compile-time code transformations, but they cannot change Nim's syntax. However, this is no real restriction because Nim's syntax is flexible enough anyway. Macros have to be implemented in pure Nim -code if `foreign function interface (FFI) +code if the `foreign function interface (FFI) <manual.html#foreign-function-interface>`_ is not enabled in the compiler, but other than that restriction (which at some point in the future will go away) you can write any kind of Nim code and the compiler will run it at compile diff --git a/lib/wrappers/mysql.nim b/lib/wrappers/mysql.nim index 5deceb6e2..9161f5672 100644 --- a/lib/wrappers/mysql.nim +++ b/lib/wrappers/mysql.nim @@ -10,11 +10,15 @@ {.deadCodeElim: on.} {.push, callconv: cdecl.} -when defined(Unix): - const - lib = "libmysqlclient.so.(15|16|17|18)" -when defined(Windows): - const +when defined(Unix): + when defined(macosx): + const + lib = "libmysqlclient.(15|16|17[18).dylib" + else: + const + lib = "libmysqlclient.so.(15|16|17|18)" +when defined(Windows): + const lib = "libmysql.dll" type my_bool* = bool |