lcpp icon indicating copy to clipboard operation
lcpp copied to clipboard

Namespace support

Open v1993 opened this issue 9 years ago • 4 comments

If I try to load some libs, I've got an error:

/home/v/.luarocks/share/lua/5.2/lcpp.lua:1952: unknown type namespace on line _linenum_

What about it?

P.S.: I load it with ffi.cdef().

v1993 avatar Jun 30 '16 10:06 v1993

What libraries you are trying to load? Seems like in problem header used undeclared type. lcpp has nothing to do with it.

Playermet avatar Jun 30 '16 11:06 Playermet

Hey,

what version of lcpp are you using? https://github.com/m-schmoock/lcpp/blob/master/lcpp.lua#L1952 does not relate to such error.

  • what lib are you trying to load?

m-schmoock avatar Jun 30 '16 11:06 m-schmoock

I'm trying to load <stdio.h>. I'm using version from main branch of this repo.

v1993 avatar Jun 30 '16 13:06 v1993

Can't reproduce - no errors with headers from MinGW 4.9.3.

local lcpp = require("lcpp/lcpp")
local ffi = require("ffi")
ffi.cdef("#include <stdio.h>")

Playermet avatar Jun 30 '16 13:06 Playermet