How to create own BMax libs?

BlitzMax Forums/BlitzMax Beginners Area/How to create own BMax libs?

va!n(Posted 2006) [#1]
Can someone show and explain me an easy to understand and complete example, how to create own libs for BlitzMax?

All routines are not coded in Blitz and they are available as *.lib and *.dll files...

So how to create a headerfile or however this is called in BlitzMax (modul?) to link needed functions to the executeable and how to access the *.dll file? (also two ways are requested).

Btw. here is an test header in C... maybe someone can show me how to modify it and what i need, to get it work with BlitzMax... thanks.

#ifndef THISLIBNAME
#define THISLIBNAME
extern __declspec(dllimport) long __stdcall Test_Call1(TCHAR * sString1, TCHAR * sString2, long lValue1);
extern __declspec(dllimport) TCHAR * __stdcall Test_Call2(TCHAR * sString1, TCHAR * sString2, TCHAR * sString3, long lValue1, long lValue2);
extern __declspec(dllimport) TCHAR __stdcall Test_Call3(TCHAR * sString1);
extern __declspec(dllimport) float __stdcall Test_Call4(TCHAR * s);
extern __declspec(dllimport) double __stdcall Test_Call5(TCHAR * s);
#endif


Sub_Zero(Posted 2007) [#2]
it's all in the blitzmax docs under "Help -> Language -> Advanced Topics" : "Interfacing with other languages"