diff options
author | Araq <rumpf_a@web.de> | 2015-09-05 12:03:53 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2015-09-05 12:03:53 +0200 |
commit | 0320c0c73b1065492c036eff09fb1a7b424223cc (patch) | |
tree | e8ad8a042cfbc419e119a2e4d5a10b28c72ef236 | |
parent | 49d810f3410c19803f2d6fbfb3feb03e1fc13fee (diff) | |
download | Nim-0320c0c73b1065492c036eff09fb1a7b424223cc.tar.gz |
fixes DLL hell on Windows
-rw-r--r-- | lib/wrappers/openssl.nim | 12 | ||||
-rw-r--r-- | lib/wrappers/pcre.nim | 7 | ||||
-rw-r--r-- | lib/wrappers/pdcurses.nim | 8 | ||||
-rw-r--r-- | lib/wrappers/sqlite3.nim | 8 | ||||
-rw-r--r-- | web/news.txt | 13 |
5 files changed, 41 insertions, 7 deletions
diff --git a/lib/wrappers/openssl.nim b/lib/wrappers/openssl.nim index 013f26943..90610eb74 100644 --- a/lib/wrappers/openssl.nim +++ b/lib/wrappers/openssl.nim @@ -14,9 +14,15 @@ const useWinVersion = defined(Windows) or defined(nimdoc) when useWinVersion: - const - DLLSSLName = "(ssleay32|libssl32).dll" - DLLUtilName = "libeay32.dll" + when not defined(nimOldDlls) and defined(cpu64): + const + DLLSSLName = "(ssleay64|libssl64).dll" + DLLUtilName = "libeay64.dll" + else: + const + DLLSSLName = "(ssleay32|libssl32).dll" + DLLUtilName = "libeay32.dll" + from winlean import SocketHandle else: const diff --git a/lib/wrappers/pcre.nim b/lib/wrappers/pcre.nim index 4b6acce01..6c7088bbf 100644 --- a/lib/wrappers/pcre.nim +++ b/lib/wrappers/pcre.nim @@ -310,7 +310,12 @@ type when not defined(usePcreHeader): when hostOS == "windows": - const pcreDll = "pcre.dll" + when defined(nimOldDlls): + const pcreDll = "pcre.dll" + elif defined(cpu64): + const pcreDll = "pcre64.dll" + else: + const pcreDll = "pcre32.dll" elif hostOS == "macosx": const pcreDll = "libpcre(.3|.1|).dylib" else: diff --git a/lib/wrappers/pdcurses.nim b/lib/wrappers/pdcurses.nim index 74993c515..2d64ac97a 100644 --- a/lib/wrappers/pdcurses.nim +++ b/lib/wrappers/pdcurses.nim @@ -42,8 +42,14 @@ pdcwin.h: when defined(windows): import windows + when defined(nimOldDlls): + const pdcursesdll = "pdcurses.dll" + elif defined(cpu64): + const pdcursesdll = "pdcurses64.dll" + else: + const pdcursesdll = "pdcurses32.dll" + const - pdcursesdll = "pdcurses.dll" unixOS = false {.pragma: extdecl, stdcall.} diff --git a/lib/wrappers/sqlite3.nim b/lib/wrappers/sqlite3.nim index 24c271ab7..c5019960c 100644 --- a/lib/wrappers/sqlite3.nim +++ b/lib/wrappers/sqlite3.nim @@ -9,8 +9,12 @@ {.deadCodeElim: on.} when defined(windows): - const - Lib = "sqlite3.dll" + when defined(nimOldDlls): + const Lib = "sqlite3.dll" + elif defined(cpu64): + const Lib = "sqlite3_64.dll" + else: + const Lib = "sqlite3_32.dll" elif defined(macosx): const Lib = "libsqlite3(|.0).dylib" diff --git a/web/news.txt b/web/news.txt index a13334e3f..4a54a9f8e 100644 --- a/web/news.txt +++ b/web/news.txt @@ -50,7 +50,18 @@ News and are now deprecated and will be removed from the language. Instead you have to insert type conversions like ``(proc (a, b: int) {.closure.})(myToplevelProc)`` if necessary. + - The constant fights between 32 and 64 bit DLLs on Windows have been put to + an end: The standard distribution now ships with 32 and 64 bit versions + of all the DLLs the standard library needs. This means that the following + DLLs are now split into 32 and 64 versions: + * ``prce.dll``: Split into ``prce32.dll`` and ``prce64.dll``. + * ``pdcurses.dll``: Split into ``pdcurses32.dll`` and ``pdcurses64.dll``. + * ``sqlite3.dll``: Split into ``sqlite3_32.dll`` and ``sqlite3_64.dll``. + * ``ssleay32.dll``: Split into ``ssleay32.dll`` and ``ssleay64.dll``. + * ``libeay32.dll``: Split into ``libeay32.dll`` and ``libeay64.dll``. + + Compile with ``-d:nimOldDLLs`` to make the stdlib use the old DLL names. Library additions @@ -79,6 +90,8 @@ News - Tuple unpacking finally works in a non-var/let context: ``(x, y) == f()`` is allowed. Note that this doesn't declare ``x`` and ``y`` variables, for this ``let (x, y) == f()`` still needs to be used. + - ``when nimvm`` can now be used for compiletime versions of some code + sections. See (XXX) for details. Bugfixes |