Skip to main content
GameDev.net gamedev.net
🔒 Locked

Uresolved external symbol.........

Started by Olympiakos Sep 26, 2008 at 7:02 PM 7 replies 1.4k views
Original Post
Olympiakos
Olympiakos
I need help to elliminate the follwoing compiler error: nehegl_glut.obj : error LNK2001: unresolved external symbol "void __cdecl CreateTexture(unsigned int * const,char *,int)" (?CreateTexture@@YAXQAIPADH@Z) Debug/nehegl_glut.exe : fatal error LNK1120: 1 unresolved externals The error disappears and the program runs when i remove the following: CreateTexture(g_TexturesArray,"logo.tga",0); It doesn't texture the cube of course when I remove it. Any help will be really appreciated! I just can't mess with it!
zedz
zedz
not opengl related
have a search for 'error LNK2001: unresolved external symbol'

u should find info on solving the problem most likely caused by not linking with the lib that function is created in
Olympiakos
Olympiakos
I've searched for this specific error but still couldn't get rid of it!
Anyone else knows what is the name of the .lib file for the CreateTexture() function???
reoxthen
reoxthen
afaik there's no official opengl related library that has a function called CreateTexture(). if you downloaded a 3rd party library to use this function you have to link this lib to your project.
polymorphed
polymorphed
The error is either caused by a mismatch between the prototype/declaration in the header file and the actual implementation in the source file, or all you've got is the header file and no implementation. Do you have the actual function implementation?
while (tired) DrinkCoffee();
Olympiakos
Olympiakos
Quote:
Original post by polymorphed
The error is either caused by a mismatch between the prototype/declaration in the header file and the actual implementation in the source file, or all you've got is the header file and no implementation. Do you have the actual function implementation?


The unrarred file contains the following:

1) The program that does the job (nehegl_glut.cpp) that calls the function

CreateTexture(g_TexturesArray,"logo.tga",0);

2) The function prototype is in the header Tga.h and is like:

void CreateTexture(GLuint textureArray[], char *strFileName, int textureID);

3) Also there’s another program (tga.cpp) without the int main(int argc, char** argv) which includes the function implementation:

void CreateTexture(GLuint textureArray[], char *strFileName, int textureID)
{
Code in here………………..
}


What do you think?


dmatter
dmatter
Sounds right. If you're using an IDE (and I assume you are) then you need to have them all included in a project. If that doesn't work then if there's a link to the source you could provide it for us to fish through ourselves.
Olympiakos
Olympiakos
Quote:
Original post by dmatter
Sounds right. If you're using an IDE (and I assume you are) then you need to have them all included in a project. If that doesn't work then if there's a link to the source you could provide it for us to fish through ourselves.


I'm using Microsoft Visual C++ 6.0.

It's in the home page mate,

Under the "OpenGL Basecode" click on where it says "NeheGL GLut"
MaulingMonkey
MaulingMonkey
Just to ward off any horrified replies that you're using a 10 year old tool that predates C++ (well, it's standard at least) and is no longer supported by it's maker...

I'm going to point out that you may want to update to the free VS9 Express Edition (otherwise known as Visual C++ 2008 Express Edition).

But that's an aside.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.