Hi ,
I have just started making a C++ wrapper for open GL. What I have done is created a class called Triangle, which contains and array of 3 Vertices as private data, and a public render() function. Hence from another program you can create a Triangle and just call render() to draw.
I have compiled this on Linux into a static library without problems. I now try and write a test program (using Qt, but this shouldn’t be relevent) to test it, and I link this to my library. When I run it causes a segmentation fault and exits. Why is this? Is there something special I need to do make a libary and program work together like this. Obviosly there are other libraries which make this work, and it may be a general linking problem rather than and openGL problem, but any ideas?
Thanks in advance,
David