You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While looking for a workaround for issue #257, it looks like getheader might not be managing well header files with symbols like _:
I have the file occt_wrapper.nim:
# nim c -d:Geom2dCartesianPointStd occt_wrapperimport nimterop/[build, cimport]
static:
cDebug() # Print wrapper to stdoutcIncludeDir("/usr/include/opencascade")
# The following should create the variables: "Geom2d_CartessianPointPath" # and "Geom2d_CartessianPointLPath"getHeader( "opencascade/Geom2d_CartesianPoint.hxx", altNames ="TKG2d", outdir="/usr/lib" )
# Checking if nim was called with "-d:headerStatic"whennotisDefined(headerStatic):
c2nImport(Geom2d_CartesianPointPath, recurse =true, mode="cpp", dynlib = Geom2d_CartesianPointLPath) # Pass dynlib if not static linkelse:
c2nImport(Geom2d_CartesianPointPath, recurse =true, mode="cpp")
but when I compile:
nim c -d:Geom2dCartesianPointStd occt_wrapper
I get the error in the getHeader line:
/home/jose/.choosenim/toolchains/nim-1.2.6/lib/system/fatal.nim(49, 5) Error: unhandled exception: /home/jose/.nimble/pkgs/nimterop-#head/nimterop/build/getheader.nim(506, 16) `Geom2dCartesianPointPath.len != 0`
Header opencascade/Geom2d_CartesianPoint.hxx not found - missing/empty outdir or -d:Geom2dCartesianPointStd -d:Geom2dCartesianPointGit -d:Geom2dCartesianPointDL -d:Geom2dCartesianPointConan or -d:Geom2dCartesianPointJBB not specified [AssertionError]
I have tried using the header name: /usr/include/opencascade/Geom2d_CartesianPoint.hxx and I get the error:
Header /usr/include/opencascade/Geom2d_CartesianPoint.hxx not found - missing/empty outdir or -d:Geom2dCartesianPointStd -d:Geom2dCartesianPointGit -d:Geom2dCartesianPointDL -d:Geom2dCartesianPointConan or -d:Geom2dCartesianPointJBB not specified [AssertionError]
but that file obviously exists.
The text was updated successfully, but these errors were encountered:
I tried this with SDL_version.h and libSDL2.so and it worked for me. I suspect it has to do with you setting outdir = "/usr/lib". I'll recommend simply setting it to getProjectCacheDir("opencascade") or currentSourcePath.parentDir() and retrying.
While looking for a workaround for issue #257, it looks like
getheader
might not be managing well header files with symbols like_
:I have the file occt_wrapper.nim:
but when I compile:
I get the error in the
getHeader
line:I have tried using the header name:
/usr/include/opencascade/Geom2d_CartesianPoint.hxx
and I get the error:but that file obviously exists.
The text was updated successfully, but these errors were encountered: