Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Unresolved External for skybox

$
0
0
Im creating what should be a simple skybox. However I have the following linker issue.


1>skybox.obj : error LNK2019: unresolved external symbol "int __cdecl LoadBitmapA(char const *)" (?LoadBitmapA@@YAHPBD@Z) referenced in function "void __cdecl initSkyBox(void)" (?initSkyBox@@YAXXZ)
fatal error LNK1120: 1 unresolved externals

Im using classes to make this skybox and therefore have a skybox.h and skybox.cpp aswell as a texture.h and texture.cpp

Below is the skybox cpp.

void initSkyBox()
{
	glLoadIdentity();
	glOrtho(-1.0, 1.0, -1.0, 1.0, -2.0, 2.0);

	sky= gluNewQuadric();
	gluQuadricTexture( sky, GL_TRUE);
	skyTexture = LoadBitmap("STARS.bmp");
}


void drawSkyBox()
{
	glEnable(GL_TEXTURE_2D);
	glBindTexture(GL_TEXTURE_2D,skyTexture);
	glMatrixMode(GL_MODELVIEW);
    glPushMatrix();
	glTranslatef(0,0,0);
    glRotated(180,1,0,0);
    gluSphere(sky,30,20,20);
    glPopMatrix();
    glDisable ( GL_TEXTURE_2D );
}



and the header

void drawSkyBox();
void initSkyBox();

static GLUquadric *sky;
static GLuint skyTexture;



I dont know if the problem lies in these files or not, any help would be appreciated.

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>