1

working with OpenGL using the SOIL Texture binding library. However whenever I try and load a texture, I get these errors:

1>libsoil.a(stb_image_aug.o) : error LNK2019: unresolved external symbol ___chkstk_ms referenced in function _stbi_jpeg_load_from_file
1>libsoil.a(image_helper.o) : error LNK2019: unresolved external symbol _sqrtf referenced in function _RGBE_to_RGBdivA2
1>C:\Users\Student\Dropbox\Work\Year 2\Graphics 1\Coursework\GraphicsCoursework\Debug\GraphicsCoursework.exe : fatal error LNK1120: 2 unresolved externals

The code I use to load these textures is as such:

int Platform::loadTexture(){
GLuint tex_plat = SOIL_load_OGL_texture(
            "platform.png",
            SOIL_LOAD_AUTO,
            SOIL_CREATE_NEW_ID,
            SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y | SOIL_FLAG_NTSC_SAFE_RGB | SOIL_FLAG_COMPRESS_TO_DXT
            );

    if( tex_plat > 0 )
    {
        glEnable( GL_TEXTURE_2D );
        glBindTexture( GL_TEXTURE_2D, tex_plat );
        return tex_plat;
    }
    else{
        return 0;
    }
}

Any idea as to what these errors mean?

4

0 回答 0