It is necessary to initialize LEXSDL (internally SDL too) before using it. If what is wanted is use LEXSDL in a existing project using SDL, check Integrating.