sfumes 0 Newbie Poster

Hello all, I am trying to create C++ DLLs with functions that I can call from matlab. From Matlab, I can call "loadlibrary" w/o a problem but when I want to view the functions using "libfunctions" MATLAB says "No methods for class lib.C:\Sam\MathFuncsDll\debug\MathFuncsDll or no class lib.C:\Sam\MathFuncsDll\debug\MathFuncsDll."

I am using VS2005 IDE and Matlab 7.1. Here's my C++ code:

// MathFuncsDll.h

#ifdef __cplusplus
extern "C" {
#endif
	__declspec(dllexport) int getSquare(int a);
#ifdef __cplusplus
}
#endif
// MathFuncsDll.cpp

#include "MathFuncsDll.h"
#include <stdexcept>

using namespace std;
extern "C" {
	int getSquare(int a)
	{
		return a*a;
	}
} /* end extern "C" */