Apparently, libltdl falls back to looking up the "unadorned" symbol
names if the _LTX_ symbols are not found. This means it finds exit in
the C library instead of returning an error, with obvious consequences.
#include "texture.h"
#define init engine_LTX_init
#include "texture.h"
#define init engine_LTX_init
+#define exit engine_LTX_exit
int init(GTypeModule *m)
{
int init(GTypeModule *m)
{
texture_register(m);
return 0;
}
texture_register(m);
return 0;
}