[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Clanlib-devel] Error when compiling ClanLib



Quoting Bjørn Lindeijer (t.lindeijer@student.rug.nl):

> Sources/Core/System/Win32/cl_library.cpp:60: invalid conversion from 
> `int (*)()
>    ' to `void*'

Just looked at the MSDN docs for GetProcAddress, and yes, it returns a
FARPROC which is a typedef for an int(*)().

I wonder why MSVC didnt even make a warning about this. :)

Anyways, you solve the problem by simply adding a cast to a (void *):

	void *adr = (void *) GetProcAddress(handle,symbol.c_str());

I've committed a fix for this to cvs.

-- 
Magnus Norddahl,
Clansoft

_______________________________________________
Clanlib-devel mailing list
Clanlib-devel@clanlib.org
http://clanlib.org/mailman/listinfo/clanlib-devel