openGL image loading, code prob, please help!

Hey all, I found really concise and small openGL JPEG image loading code example, that runs on my VS2008 no problem. I am trying to move this code into my existing program that has a brick shader (from, but I am stuck on some header error. I have been banging at it and googling it for over two hours now. Can anybody look at my Visual Studio project. I bet I am making some noob C++ mistake. The problem seems to be when I include “jpeg.h” in ogl2brick.h. It is on line 54.

Link to project:

Link to original JPEG loading project:

This is not really related to Opengl… Please print the compiler output.

I get 306 errors, the first one is:

Error 2 error C2143: syntax error : missing ‘{’ before ‘:’ C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\cstdio 39 ogl2brick

The output doesn’t tell much, and it all happens because of that one include statement.

hem, that does not help much indeed. Put the full compiler output between code tags

. I do not have the ability to compile your project from VS.

Apparently the problem was that my files were in .c, and changing them to .cpp fixed it. Now my code compiles, but try as I might, I cannot get a texture on an object using this library :frowning:

I did however get some random bmp24 loading function to work, I even got it to texture with GLSL :slight_smile: