1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-07-03 00:46:55 +02:00

* applied ubuntux's patches

* fixed AmptyAI (it builds now)
This commit is contained in:
mateuszb
2009-04-13 18:52:20 +00:00
parent de71191307
commit 4d3808cfa0
11 changed files with 142 additions and 173 deletions

View File

@ -27,6 +27,11 @@ CGlobalAI * CAIHandler::getNewAI(CCallback * cb, std::string dllname)
getAI = (CGlobalAI*(*)())GetProcAddress(dll,"GetNewAI");
#else
void *dll = dlopen(dllname.c_str(), RTLD_LOCAL | RTLD_LAZY);
if (!dll)
{
tlog1 << "Cannot open AI library ("<<dllname<<"). Throwing..."<<std::endl;
throw new std::string("Cannot open AI library");
}
getName = (void(*)(char*))dlsym(dll,"GetAiName");
getAI = (CGlobalAI*(*)())dlsym(dll,"GetNewAI");
#endif