Hazoc Posted March 2, 2011 Share Posted March 2, 2011 (This would make a great addition to the odwiki too ). I'd say it's a must:) Thanks a lot Swann! Quote Link to comment Share on other sites More sharing options...
Guest Swann Posted March 2, 2011 Share Posted March 2, 2011 (edited) Hey, this knowledge is out there. Like I sad it's based on cybermax tutorial, info from odforce Wiki and Realflow SDK instruction. Now if you make it once you know better what to look for but without this you are lost. Still I'm suprised that we don't have info like this in Houdini's documentation. Maybe SESI is not using VS ? or maybe they always compile with makefiles ? I don't know, all I know is that Realflow does have complete instruction how to setup VS for it's SDK, Softimage creates and setup automatically solution if you wan't write plugin. I supose SESI knows better how to setup VS and what to put where to make it work properly, so small instruction from them would be very helpful. Maybe we should all add this request for Houdini 12 Wishlist ? BTW. Guys, I strongly recommend Virtual Assist plugin for VisualStudio http://www.wholetomato.com/. It gives you full intelliscence for C++ simmilar to that you get for .NET languages so it's alot easier to develop. C++ is no longer first class citizen in Windows world so VS is s a little behind with features for it (like 3-4 years behind ) compared to C#. Edited March 2, 2011 by SWANN Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted December 23, 2012 Share Posted December 23, 2012 (edited) Hi guys, i have some problems with inlinecpp. I'm on Win7x64, it compiles and works fine, but i cant find a way to use my extension without source code. From Docs: Distributing Your Compiled Library If you want to distribute your compiled library without worrying whether the user has a proper compiler environment set up, simply distribute the shared object (.so/.dll/.dylib) file from your$HOME/houdiniX.Y/inlinecpp directory that inlinecpp created. As long as the user doesn’t modify your C++ source code, the checksum will be the same and the file name of the shared object file file will be the same. Houdini will look in all inlinecpp subdirectories of $HOUDINI_PATH when looking for the shared object, so you can put the shared library at any point in your Distributing Your Compiled Library If you want to distribute your compiled library without worrying whether the user has a proper compiler environment set up, simply distribute the shared object (.so/.dll/.dylib) file from your$HOME/houdiniX.Y/inlinecpp directory that inlinecpp created. As long as the user doesn’t modify your C++ source code, the checksum will be the same and the file name of the shared object file file will be the same. Houdini will look in all inlinecpp subdirectories of $HOUDINI_PATH when looking for the shared object, so you can put the shared library at any point in your $HOUDINI_PATH. Is it absolutely necessary to define $HOUDINI_PATH variable? Right now my extension dll is here $HOME/houdini12.1/inlinecpp/*.dll and It works only with source code module = inlinecpp.createLibrary(......blablabla......).........module.myFunc()[/CODE]But i want use this extension in another file, without source code. I tried to import this extension in python shell:[CODE] import extension_name. [/CODE].No luck.Any help here? Thx Edited December 23, 2012 by Stalkerx777 Quote Link to comment Share on other sites More sharing options...
graham Posted December 23, 2012 Share Posted December 23, 2012 The $HOME/houdiniX.Y directory is in the automatically defined HOUDINI_PATH so you don't need to set it. You'll always need the source Python code. It is responsible for handling the conversion between Python and the compiled c++ code. Just having the dso/dll is not sufficient as that file is basically just a collection of C functions that are then used by inlinecpp. Quote Link to comment Share on other sites More sharing options...
Stalkerx777 Posted December 23, 2012 Share Posted December 23, 2012 The $HOME/houdiniX.Y directory is in the automatically defined HOUDINI_PATH so you don't need to set it. You'll always need the source Python code. It is responsible for handling the conversion between Python and the compiled c++ code. Just having the dso/dll is not sufficient as that file is basically just a collection of C functions that are then used by inlinecpp. Thx graham.! Yes, now i understand. cppinline.py uses ctypes ctypes.cdll.LoadLibrary[/CODE] to link between python objects and C objects. So, in theory, i can write my own loader of shared library, and drop off c++ code, but i guess this is not a good idea =) OK? what if i want to have a python module that have a bunch of cool HDK functions. Which way to go? What is the best way to write some HDK c++ and wrap it to python module. I don't have experience in wrapping c++, and there are a lot of info on the web, but what is the "right" way.? Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.