Jump to content

Recommended Posts

Posted

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.

Q6600@2.4GHz - 9600GT - 4GB DDR2@800MHz - Windows7 x64

3ds max / photoshop CS3 / C++

http://www.arbuznikov.com

Posted

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 :huh:

Ryzen 9 RX 6800M ■ 16GB XF8 Windows 11 ■
Ultra ■ LE 2.53DWS 5.6  Reaper ■ C/C++ C# ■ Fortran 2008 ■ Story ■
■ Homepage: https://canardia.com ■

Posted

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.

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"

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...