diff --git a/all.html b/all.html index 5a030d1..a444a88 100755 --- a/all.html +++ b/all.html @@ -1264,7 +1264,7 @@ function main() { diff --git a/cimport.html b/cimport.html index 6d150b9..609aeda 100755 --- a/cimport.html +++ b/cimport.html @@ -1281,8 +1281,9 @@ function main() { title="cIncludeDir(dir: static string): untyped">cIncludeDir
  • cCompile
  • -
  • cImport
  • +
  • cImport
  • @@ -1445,11 +1446,26 @@ Add an include directory that is forwarded to the C/C++ compiler using cCompile("path/to/dir", exclude="test2.c") - -
    macro cImport(filename: static string; recurse: static bool = false): untyped
    + +
    macro cImport(filename: static string; recurse: static bool = false;
    +             dynlib: static string = ""): untyped

    Import all supported definitions from specified header file. Generated content is cached in nimcache until filename changes unless cDisableCaching() is set. nim -f can also be used after Nim v0.19.4 to flush the cache.

    recurse can be used to generate Nim wrappers from #include files referenced in filename. This is only done for files in the same directory as filename or in a directory added using cIncludeDir()

    +

    dynlib can be used to specify the Nim string to use to specify the dynamic library to load the imported symbols from. For example:

    +
    const
    +  dynpcre =
    +    when defined(windows):
    +      when defined(cpu64):
    +        "pcre64.dll"
    +      else:
    +        "pcre32.dll"
    +    elif hostOS == "macosx":
    +      "libpcre(.3|.1|).dylib"
    +    else:
    +      "libpcre.so(.3|.1|)"
    +
    +cImport("pcre.h", dynlib="dynpcre")

    If dynlib is not specified, the C/C++ implementation files can be compiled in with cCompile(), or the {.passL.} pragma can be used to specify the static lib to link.

    @@ -1463,7 +1479,7 @@ Add an include directory that is forwarded to the C/C++ compiler using
    - Made with Nim. Generated: 2019-05-09 02:07:17 UTC + Made with Nim. Generated: 2019-05-09 04:53:00 UTC diff --git a/cimport.idx b/cimport.idx index 65b278b..19d15b6 100755 --- a/cimport.idx +++ b/cimport.idx @@ -9,4 +9,4 @@ cAddSearchDir cimport.html#cAddSearchDir,string cimport: cAddSearchDir(dir: stri cIncludeDir cimport.html#cIncludeDir.m, cimport: cIncludeDir(dir: static string): untyped cAddStdDir cimport.html#cAddStdDir,string cimport: cAddStdDir(mode = "c") cCompile cimport.html#cCompile.m,,string,string cimport: cCompile(path: static string; mode = "c"; exclude = ""): untyped -cImport cimport.html#cImport.m, cimport: cImport(filename: static string; recurse: static bool = false): untyped +cImport cimport.html#cImport.m,,string cimport: cImport(filename: static string; recurse: static bool = false;\n dynlib: static string = ""): untyped diff --git a/compat.html b/compat.html index d70bd18..2dbd266 100755 --- a/compat.html +++ b/compat.html @@ -1281,7 +1281,7 @@ naive version of os.relativePath ; remove after nim >= 0.19.9 diff --git a/git.html b/git.html index 1d9883c..03d6476 100755 --- a/git.html +++ b/git.html @@ -1368,7 +1368,7 @@ function main() { diff --git a/paths.html b/paths.html index 8ae6986..c245185 100755 --- a/paths.html +++ b/paths.html @@ -1312,7 +1312,7 @@ all nimterop generated files go under here (gitignored) diff --git a/plugin.html b/plugin.html index 0e103c7..7211c2c 100755 --- a/plugin.html +++ b/plugin.html @@ -1287,7 +1287,7 @@ function main() { diff --git a/theindex.html b/theindex.html index 55e6c34..51d103e 100755 --- a/theindex.html +++ b/theindex.html @@ -1247,7 +1247,9 @@ function main() {
    cImport:
    cIncludeDir: