As I said in the issue, at least one thing that's immediately obvious is the 
fact that you haven't used backticks so that Nim can actually name the variable 
the same way - Nim mangles variable names when compiling to C, so you need to 
do that:
    
    
    proc getint*():cint =
        
        var i {.nodecl}: cint
        {.emit:"int `i`; `i` = 14;"}
        return i
    
    echo getint()
    
    
    Run

Reply via email to