Borland 5.02 Unresolved External

Hello,

Using Borland C++ 5.02, examples straight from OpenGL SuperBible…getting an Unresolved external ‘_TextureLoad’ referenced from “projectname”.obj every time. All other programs compile fine, but every project with a bitmap gets the one error. Thanks for any feedback!!

Sounds like you may have a file missing, see if there should be a .cpp file with the loadtexture routine in it.

Originally posted by jareding:
[b]Hello,

Using Borland C++ 5.02, examples straight from OpenGL SuperBible…getting an Unresolved external ‘_TextureLoad’ referenced from “projectname”.obj every time. All other programs compile fine, but every project with a bitmap gets the one error. Thanks for any feedback!![/b]

With bc++, an “unresolved external” means that a function, here TextureLoad (the _ before it is internal to the compiler), is called by your program, but its code can’t be found by the linker.
The file containing the code for TextureLoad is probably missing in your project. This file might be a .c, .cpp, as nexusone says.
Important : if this file is already compiled (.obj or .lib), re-compile it. It may have been compiled by vc++.
It would be a good idea to recompile all the code in your project with bc++, from .c and .cpp files.

You guys are on to something…individually compiling seperate .c and .cpp files.

Bitmap.h has syntax error at:

extern GLubyte *LoadDIBitmap(const char *filename, BITMAPINFO **info);
extern int SaveDIBitmap(const char *filename, BITMAPINFO *info, GLubyte *bits);

Texture.c has syntax error at:

GLuint TextureLoad(char *filename, GLboolean alpha,GLenum minfilter, GLenum magfilter,GLenum wrap);

Thanks a lot for your help…I’m trying to distinguish why these guys can’t talk back to each other…