View Full Version : error LNK2019: unresolved external symbol

03-07-2015, 07:59 AM
unresolved external symbol "signed char * __cdecl gltLoadTGA(char const *,int *,int *,int *,unsigned int *)" (?gltLoadTGA@@YAPACPBDPAH11PAI@Z),

I include head files,
include "stdafx include "gltools
include "GL/glut
include "GLee
include "math3d

in system/independences, add these lib,

Which lib is the gltLoadTGA() function in?

03-07-2015, 08:12 AM
and this function
void __cdecl m3dFindNormal(float * const,float const * const,float const * const,float const * const)" (?m3dFindNormal@@YAXQAMQBM11@Z),
where is it?

Alfonse Reinheart
03-07-2015, 08:15 AM
If you wrote this code, then you must have some idea of where those functions came from. And if you didn't write it, and are just copying it from some website or somesuch, you should read the source documentation to find out where it does come from.

03-07-2015, 08:31 AM
So it is,
this is from an example of gl book. i copy it from an article without read the book. search and find it lack of the function in lib.
i shall try and how about other pic format? if i don;t use tga format.

Alfonse Reinheart
03-07-2015, 09:05 AM
A "gl book"? That's not exactly narrowing it down; there are literally dozens of these.

And if you're just copying from an article without even knowing what the book that article itself was copying from... how do you expect your code to actually work?

Lastly, copying random code you found on the Internet is not an effective means to learn anything.

03-07-2015, 05:13 PM
welll, I shall check its name. then tell you and some results

Dark Photon
03-08-2015, 11:23 AM
unresolved external symbol "signed char * __cdecl gltLoadTGA(char const *,int *,int *,int *,unsigned int *)" (?gltLoadTGA@@YAPACPBDPAH11PAI@Z)

Just websearch it:

* gltLoadTGA (http://lmgtfy.com/?q=gltLoadTGA)

First hit from the hit list:

* Texture Mapping (opengl.org) (https://www.opengl.org/discussion_boards/showthread.php/165911-Texture-Mapping)