Hello all,

Users of the latest lite-C free version (at least version 7.84) may have noticed that GSHashmap.dll fails to load. The most obvious symptom is the "Empty prototype called in ..." run-time error. This happens because support for engine plugins has been removed from the free version (it seems it should have never been there in the first place; read more here). This change also seems to break automagic function loading from DLLs. The way to load such functions is now by prototyping and defining PRAGMA_API (read the manual).

I rewrote GSHashmap.h (with feedback from pegamode; thanks!) to be compliant with the newer lite-C free. I use the API macro, which is equivalent to the #define PRAGMA_API statement but more readable.
Code:
/***************************************************************************************

Header for GSHashmap DLL

Version 1.0 - by Pegamode - 2008-11-01

modified 06-06-2010 by BigM to use the API macro, for compatibility with lite-C free

****************************************************************************************/

#ifndef GSHashmap_header
#define GSHashmap_header

	var createDynamicGSHashmap();
	void destroyDynamicGSHashmap(var);
	void addToDynamicGSHashmap(var, char*, var);
	var getFromDynamicGSHashmap(var, char*);
	void clearDynamicGSHashmap(var);
	void removeFromDynamicGSHashmap(var, char*);
	var isInDynamicGSHashmap(var, char*);
	var sizeOfDynamicGSHashmap(var);
	var sizeInBytesOfDynamicGSHashmap(var);
	void addToGSHashmap(char* key, var value);
	var getFromGSHashmap(char* key);
	void clearGSHashmap();
	void removeFromGSHashmap(char* key);
	var isInGSHashmap(char* key);
	var sizeOfGSHashmap();
	var sizeInBytesOfGSHashmap();

	API(createDynamicGSHashmap, GSHashmap)
	API(destroyDynamicGSHashmap, GSHashmap)
	API(addToDynamicGSHashmap, GSHashmap)
	API(getFromDynamicGSHashmap, GSHashmap)
	API(clearDynamicGSHashmap, GSHashmap)
	API(removeFromDynamicGSHashmap, GSHashmap)
	API(isInDynamicGSHashmap, GSHashmap)
	API(sizeOfDynamicGSHashmap, GSHashmap)
	API(sizeInBytesOfDynamicGSHashmap, GSHashmap)
	API(addToGSHashmap, GSHashmap)
	API(getFromGSHashmap, GSHashmap)
	API(clearGSHashmap, GSHashmap)
	API(removeFromGSHashmap, GSHashmap)
	API(isInGSHashmap, GSHashmap)
	API(sizeOfGSHashmap, GSHashmap)
	API(sizeInBytesOfGSHashmap, GSHashmap)
	
#endif


I did only minor testing and cannot guarantee all functions will work with lite-C free. The essential functions createDynamicGSHashmap, addToDynamicGSHashmap, getFromDynamicGSHashmap and isInDynamicGSHashmap seem to be ok.

Hope this helps the lite-C free community!

Cheers