PDA

View Full Version : LNK2001 _rgbImageLoad -> copy.c sample



doublepoison
06-03-2003, 03:37 AM
VC++ 6
I get a LNK2001 unresolved external error relating to _rgbImageLoad when I try to compile the copy.c sample file . http://www.opengl.org/developers/code/examples/samples/samples.html

I've tried including as a previous thread said (fred)
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")

but no luck (fairly obvious in hindsight)


extern RGBImageRec *rgbImageLoad(char *);

starman
06-03-2003, 06:13 AM
rgbImageLoad isn't part of opengl or the glu library...you'll need to link with the library that has that function. Isn't there an old "glaux32" GL library for Windows that contains that function?

There are freely available targa, jpeg, etc. loaders out there...bet you could find them with Google.

[This message has been edited by starman (edited 06-03-2003).]

nexusone
06-03-2003, 06:53 AM
I think that program uses the glaux library, it is inclulded with VC++ or was in earlier versions.

Just include in the link command glaux.lib, I am not sure if they have a glaux32.lib. Check the lib\ directory.

Also did you download the zip file at the top of the page which has the include files needed rgb.h.



Originally posted by doublepoison:
VC++ 6
I get a LNK2001 unresolved external error relating to _rgbImageLoad when I try to compile the copy.c sample file . http://www.opengl.org/developers/code/examples/samples/samples.html

I've tried including as a previous thread said (fred)
#pragma comment(lib, "opengl32.lib")
#pragma comment(lib, "glu32.lib")

but no luck (fairly obvious in hindsight)


extern RGBImageRec *rgbImageLoad(char *);

doublepoison
06-04-2003, 01:48 AM
I didn't get to finish the post before I realised my the meter on my car had run out ten minutes ago .

as I was saying the rgb.h file (yep I done got the whole zip package) references :
extern RGBImageRec *rgbImageLoad(char *);

which makes no sense to me because it's referencing an external type , but the type is defined locally (within the header) . I admit I know little , but this is confusing .

. we've got the glaux.lib , so no luck there .


[This message has been edited by doublepoison (edited 06-04-2003).]