If I comment out the glimg image loading stuff and the include files for it then the program runs the triangle demo properly. If I don't comment out the header for the glimg stuff, then the program crashes.