smt

So I'm trying to make a simple little library, for the purposes of testing all there is is a simple proc that should echo a hello world, seems to be fine there, however when i 'nimble install' it i find importing it seems to do nothing, i get no errors during compile relating to the library it's self, simply that the proc im calling is an undeclared identifier, what exactly am I doing wrong?

# Package

version       = "0.1.0"
author        = "smt"
description   = "simple test library"
license       = "MIT"

# Dependencies

requires "nim >= 0.16.0"

proc testEcho(): void =
  echo "hello world"

The error:

Error: undeclared identifier: 'testEcho'

It's very possible I'm missing something obvious but I've looked at a few other libraries like jester and they import and work just fine

2017-01-11 23:59:48

You need to add the export marker right after the proc's id. Try this:

proc testEcho*() =
  echo "hello world"

You can also drop that : void part too.

2017-01-12 03:55:46