From 8282449aa1a2bdbfb172b361bdefcc5540f1a3fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arne=20D=C3=B6ring?= Date: Wed, 4 Jan 2017 14:02:51 +0100 Subject: [PATCH] updated doc for dynlib pragma --- doc/manual/ffi.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/doc/manual/ffi.txt b/doc/manual/ffi.txt index d7d9596d29..e9b52eaca1 100644 --- a/doc/manual/ffi.txt +++ b/doc/manual/ffi.txt @@ -226,4 +226,8 @@ conjunction with the ``exportc`` pragma: proc exportme(): int {.cdecl, exportc, dynlib.} This is only useful if the program is compiled as a dynamic library via the -``--app:lib`` command line option. +``--app:lib`` command line option. This pragma only has an effect for the code +generation on the Windows target, so when this pragma is forgotten and the dynamic +library is only tested on Mac and/or Linux, there won't be an error. On Windows +this pragma adds ``__declspec(dllexport)`` to the function declaration. +