CODE
Cannot find used extension package
What is strange is it gives me an error that seemingly says my extension does not work but the function I called out of mt DLL returned the expected value. I passed 2 and 2 into my add function and the DLL received the arguments and returned 4. After that, Game Maker drew the returned value on the screen. I know the DLL works but why is it giving me this error? Here are my source codes:
Create Event of my math object
CODE
sum = vb_add ( 2, 2 );
Draw Event of my math object
I used the DnD draw variable action and drew the variable sum.
.cpp file from my DLL
CODE
#include <windows.h>
extern "C" __declspec(dllexport) double vb_add ( double a, double b );
double vb_add ( double a, double b )
{
return a + b;
}
extern "C" __declspec(dllexport) double vb_add ( double a, double b );
double vb_add ( double a, double b )
{
return a + b;
}
One final note, the vb in front of my function does not mean I am using Visual Basic. I always put vb in front of all of my own functions (vb are my initials). I am using Visual Studio 2008 for my C++ coding and GM 7 registered for my game maker coding.