SFML community forums

Bindings - other languages => C => Topic started by: Groogy on June 16, 2012, 11:41:42 pm

Title: Loading CSFML functions dynamically doesn't work anymore
Post by: Groogy on June 16, 2012, 11:41:42 pm
Well the title explains itself. Before I could load CSFML dynamically using the OS functions for that. Now it can load the module successfully but can't find any functions in the module. Have you changed anything? Here's a simple little example of what I mean:

#include <Windows.h>

int main()
{
        HMODULE library = LoadLibrary( "csfml-system-2.dll" );
        if( library == NULL )
                return 1;

        void* func = GetProcAddress( library, "sfClock_create" );
        if( func == NULL )
                return 2;

        return 0;
}

This will fail at return 2; and I can't see why it would.
Title: Re: Loading CSFML functions dynamically doesn't work anymore
Post by: Groogy on June 16, 2012, 11:50:22 pm
Erhm never mind... If I placed the DLL in the same folder as the exe it worked. So I must have a old CSFML version lurking somewhere in my system that I have missed.