Jump to content
Sign in to follow this  
resonanz

inlinecpp again

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]

Share this post


Link to post
Share on other sites

Are you using Windows? It still has issues with this. If not, what error are you getting?

Share this post


Link to post
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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×