I'm trying to write some code. Does it mean I can't write it like this?
{.emit: """
class Foo {};
""".}
type Foo {.importcpp: "Foo".} = object
proc hello(_: Foo) = echo "hello"
proc foo(call: proc (_: Foo)) =
call Foo()
error: 'Foo' has not been declaredTry this:
{.emit: """/*TYPESECTION*/
class Foo{};
""".}
type Foo {.importcpp: "Foo", nodecl.} = object
proc hello(_: Foo) = echo "Hello"
proc foo (call: proc(_: Foo)) =
call Foo()
foo hello