Linker Prob
-
Hallo Leute,
ich habe ein kleines Problem. Ich habe mir eine class BMP geschrieben. Hier die Header:
#ifndef FIBS_H #define FIBS_H class BMP{ private: GLuint texture[1]; AUX_RGBImageRec *LoadBMP(char *Filename); public: BMP(void); int LoadGLTextures(void); GLuint getTextur(void); ~BMP(void); }; #endifUnd das ist die cpp:
#include "header.h" #include "BMP.h" GLuint texture[1]; // Storage For One Texture ( NEW ) AUX_RGBImageRec *BMP::LoadBMP(char *Filename){ // Loads A Bitmap Image FILE *File=NULL; // File Handle if (!Filename) // Make Sure A Filename Was Given return NULL; // If Not Return NULL File=fopen(Filename,"r"); // Check To See If The File Exists if (File){ // Does The File Exist? fclose(File); // Close The Handle return auxDIBImageLoad(Filename); // Load The Bitmap And Return A Pointer } return NULL; // If Load Failed Return NULL } BMP::BMP(void){ } int BMP::LoadGLTextures(void){ // Load Bitmaps And Convert To Textures int Status=FALSE; // Status Indicator AUX_RGBImageRec *TextureImage[1]; // Create Storage Space For The Texture memset(TextureImage,0,sizeof(void *)*1); // Set The Pointer To NULL // Load The Bitmap, Check For Errors, If Bitmap's Not Found Quit if (TextureImage[0]=LoadBMP("Data/NeHe.bmp")){ Status=TRUE; // Set The Status To TRUE glGenTextures(1, &texture[0]); // Create The Texture // Typical Texture Generation Using Data From The Bitmap glBindTexture(GL_TEXTURE_2D, texture[0]); glTexImage2D(GL_TEXTURE_2D, 0, 3, TextureImage[0]->sizeX, TextureImage[0]->sizeY, 0, GL_RGB, GL_UNSIGNED_BYTE, TextureImage[0]->data); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_LINEAR); glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MAG_FILTER,GL_LINEAR); } if (TextureImage[0]){ // If Texture Exists if (TextureImage[0]->data){ // If Texture Image Exists free(TextureImage[0]->data); // Free The Texture Image Memory } free(TextureImage[0]); // Free The Image Structure } return Status; // Return The Status } GLuint BMP::getTextur(void){ return this->texture[0]; } BMP::~BMP(void){ }leider bekomm ich ein fehler:
Verknüpfen...
BMP.obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "_auxDIBImageLoadA@4" in Funktion ""private: struct _AUX_RGBImageRec * __thiscall BMP::LoadBMP(char *)" (?LoadBMP@BMP@@AAEPAU_AUX_RGBImageRec@@PAD@Z)".
D:\Eigene Dateien\VISUAL STUDIO 2005\PROJECTS\Open GL\Debug\Aquarium.exe : fatal error LNK1120: 1 nicht aufgelöste externe Verweise.Kann mir jemand helfen??
-
das bedeutet, dass der linker keine definition für auxDIBImageLoad finden kann. Ich denke mal, du musst glaux.lib dazulinken.
-
und wie geht das... ich bin java gewöhnt

Danke aber schon mal für die schnelle Antowort
-
Danke!