ArBuZ Posted June 23, 2011 Share Posted June 23, 2011 Hi everyone! I'm making some library now with C++. And I want to make it as dll. Is it possible to use it in BlitzMax.? I was trying to google this question, but all links Iv found lead me to BlitzMax forum. And it doesn't work now. Lets say I have some class with methods: class myClass { public void myClas(string var1, Tvec3 var2){} public void ~myClass(){} public void someMethod(TVec3 var1, TEntity entity); } How should I wrap this class in bmax. Thanks in advance. Quote Q6600@2.4GHz - 9600GT - 4GB DDR2@800MHz - Windows7 x64 3ds max / photoshop CS3 / C++ http://www.arbuznikov.com Link to comment Share on other sites More sharing options...
Canardia Posted June 23, 2011 Share Posted June 23, 2011 In the BlitzMax help under "Help/Language/Advanced topics/Interfacing with C" there is an example how to import a C++ class into BlitzMax. Using this example you could expand it so that the cpp file loads the actual DLL where the actual C++ code is, so that the imported cpp file acts only as a interface header to the dll. However, you could as well just write the whole C++ code in the cpp file which is imported by BlitzMax, since it would be faster code than if you compiled the DLL with Visual Studio, because BlitzMax uses MinGW C++. Or if you want it even faster, you could write the DLL in MinGW Fortran, then load it with C++, and then import it in BlitzMax, and it would still be OOP through the whole chain Quote ■ Ryzen 9 ■ RX 6800M ■ 16GB ■ XF8 ■ Windows 11 ■ ■ Ultra ■ LE 2.5 ■ 3DWS 5.6 ■ Reaper ■ C/C++ ■ C# ■ Fortran 2008 ■ Story ■ ■ Homepage: https://canardia.com ■ Link to comment Share on other sites More sharing options...
Marleys Ghost Posted June 23, 2011 Share Posted June 23, 2011 all links Ive found lead me to BlitzMax forum. And it doesn't work now. I think the webhosting company Mark uses for Blitzmax had a bad crash on Tuesday evening, seems its taking a while to sort out. Quote AMD Bulldozer FX-4 Quad Core 4100 Black Edition 2 x 4GB DDR3 1333Mhz Memory Gigabyte GeForce GTX 550 Ti OC 1024MB GDDR5 Windows 7 Home 64 bit BlitzMax 1.50 • Lua 5.1 • MaxGUI 1.41 • UU3D Pro • MessiahStudio Pro • Silo Pro 3D Coat • ShaderMap Pro • Hexagon 2 • Photoshop, Gimp & Paint.NET LE 2.5/3.4 • Skyline • UE4 • CE3 SDK • Unity 5 • Esenthel Engine 2.0 Marleys Ghost's YouTube Channel • Marleys Ghost's Blog "I used to be alive like you .... then I took an arrow to the head" 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.