[nim-dev] Re: A problem about the httpclient module

  • From: Stefan_Salewski <mail@xxxxxxxxxxxx>
  • To: nim-dev@xxxxxxxxxxxxx
  • Date: Sat, 28 May 2016 16:47:34 +0000

@karatin
You may read the manual (or fix it if it is wrong):

Exportc pragma

The exportc pragma provides a means to export a type, a variable, or a 
procedure to C. Enums and constants can't be exported. The optional argument is 
a string containing the C identifier. If the argument is missing, the C name is 
the Nim identifier exactly as spelled:

```nim
proc callme(formatstr: cstring) {.exportc: "callMe", varargs.}
``` 

Note that this pragma is somewhat of a misnomer: Other backends will provide 
the same feature under the same name.

Other related posts: