I didnt need that:
1. I created a class libary
2. Deleted <projectname>.h
3. coded a simple add function
Listing of <projectname>.cpp
4. complied
5. opened cmd start>run>cmd
6. cd'ed to mingw\bin
7. typed
8. whent to the folder where the .dll file was created along with the .a file you create using dlltool
9. Created a bmx file and entered the followig listing
And IJW!
Hope this helps you.
[edit]
THESE LINKS NO LONGER WORK DUE TO DELETING THE FILES
Dll Source and BMX source
[further editing]The path of the dll will be the release folder were the .sin folder is located and not the release folder were the .h and .cpp files are
1. I created a class libary
2. Deleted <projectname>.h
3. coded a simple add function
Listing of <projectname>.cpp
// This is the main DLL file. #include "stdafx.h" #define DLL extern "C" __declspec(dllexport) DLL int _stdcall Add2Ints(int a, int b); DLL int _stdcall Add2Ints(int a, int b) { return a + b; }
4. complied
5. opened cmd start>run>cmd
6. cd'ed to mingw\bin
7. typed
pexports <pathtodll><dllname>.dll > <pathtodll><dllname>.def dlltool -d <pathtodll><dllname>.def -l <pathtodll><dllname>.a
8. whent to the folder where the .dll file was created along with the .a file you create using dlltool
9. Created a bmx file and entered the followig listing
Import "<dllname>.a" Extern "win32" Function Add%(a%, b%) = "_Add2Ints@8" End Extern Print add(10, 2500)
And IJW!
Hope this helps you.
[edit]
THESE LINKS NO LONGER WORK DUE TO DELETING THE FILES
Dll Source and BMX source
[further editing]The path of the dll will be the release folder were the .sin folder is located and not the release folder were the .h and .cpp files are