PDA

View Full Version : Borland 5.02 Unresolved External



03-25-2002, 07:06 AM
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!!

nexusone
03-25-2002, 08:34 AM
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:
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!!

Morglum
03-25-2002, 09:21 AM
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.

03-25-2002, 09:34 AM
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...