News:

Building a 3D Ray Tracer  By stevmjon

Main Menu

How to use dll tool?

Started by baggey, May 29, 2018, 01:37:44 PM

Previous topic - Next topic

baggey

So created a program and now want to convert the source? to machinecode.

Im just getting errors and no .exe running faster than the origonal?

I select path and just errors?

What am i doing wrong?

However my third try shows one converted file. Not sure where it is or how to use it?

Kind Regards Baggey

Jesus was only famous because of his dad

kevin

#1
 In pictures 2 & 3 it's giving an error that your source code has no DLL exports, with out them it's like building a house with no doors / windows so nothing can get in or out.  

To make a function exportable and thus visible in the created dll, you need to add the prefix DLL_  to the function name.   So if you had a function called FillScreen(Colour) say, it'd be defined as follows


PlayBASIC Code: [Select]
function DLL_FillScreen(Colour)

// code that does this etc

endfunction





 PB2DLL will create the dll code and generate the LinkDLL bindings in PBA for this DLL.   The compiled functions will use their original name of FillScreen.   DLL_ is only needed to notate that a function is to be many visible and thus callable in the final DLL.  If you have no callable functions in the DLL then the code inside is impossible to call.