Jump to content

inlinecpp again


resonanz

Recommended Posts

Hi all!!

After some time fiddling around without success I thought it´s time to ask...

I have a simple C++ function in inlinecpp and would like to use the second imput of the node as const GU_Detail *. But this does not work althought it did in Houdini 11. As long as I use only one GU_Detail, not matter if const or not it works without problems.

Is there something I am doing wrong with the new geometry-library or is it maybe a bug?

code as follow


import inlinecpp
cppModule = inlinecpp.createLibrary(
name = "do_something",
includes = """
#include <GU/GU_Detail.h>
""",

function_sources = ["""

void doSomething(GU_Detail *gdp, const GU_Detail *gdpTemp)
{
cout << gdp->getNumPoints() << endl;
cout << gdpTemp->getNumPoints() << endl;
}

"""])

cppModule.doSomething(hou.pwd().geometry(), hou.pwd().inputs()[1].geometry())

[/CODE]

Link to comment
Share on other sites

Thanks Graham for taking a look!

Yes I am on Windows 7 64bit and the error I get is:


File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\inlinecpp.py", line
430, in createLibrary
config=config)
File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\hutil\cppinline.py",
line 1182, in create_library
include_dirs, link_dirs, link_libs)
File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\hutil\cppinline.py",
line 293, in __init__
catch_crashes)
File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\hutil\cppinline.py",
line 312, in _load
self._load_existing()
File "C:/PROGRA~4/SIDEEF~1/HOUDIN~1.167/houdini/python2.6libs\hutil\cppinline.py",
line 373, in _load_existing
getattr(self._library, function.symbol_name()))
File "C:\PROGRA~4\SIDEEF~1\HOUDIN~1.167\python26\lib\ctypes\__init__.py", line 366
, in __getattr__
func = self.__getitem__(name)
File "C:\PROGRA~4\SIDEEF~1\HOUDIN~1.167\python26\lib\ctypes\__init__.py", line 371
, in __getitem__
func = self._FuncPtr((name_or_ordinal, self))
AttributeError: function '?doSomething@@YAXPEAVGU_Detail@@PEBVGU_Detail@@@Z' not fou
nd
[/CODE]

Whatever causes the error it must be new in Houdini 12. When I tried it in Houdini 11 it works without any problems.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...