Followers 0

## 130 posts in this topic

Hi,

I would like to use SOIL with VS 2008, but I have a problem with the library.
File libSOIL.lib I copied to VC\lib and SOIL.h to VC\include and in VS 2008 I added libSOIL.lib to the Project Properties>Configuration Properties>Linker>Input>Additional Dependencies.

#include "stdafx.h"#include <gl\glut.h>#include "SOIL.h"int _tmain(int argc, _TCHAR* argv[]){	GLuint tex_2d = SOIL_load_OGL_texture	(		"bow.bmp",		SOIL_LOAD_AUTO,		SOIL_CREATE_NEW_ID,		SOIL_FLAG_MIPMAPS | SOIL_FLAG_INVERT_Y | SOIL_FLAG_NTSC_SAFE_RGB | SOIL_FLAG_COMPRESS_TO_DXT	);	return 0;}

This code ganeretes these errors:
Error 1 error LNK2019: unresolved external symbol __alloca referenced in function _stbi_zlib_decode_noheader_buffer libSOIL.lib
Error 2 error LNK2019: unresolved external symbol _sqrtf referenced in function _RGBE_to_RGBdivA2 libSOIL.lib

0

##### Share on other sites

Can it flip sprites "horizontally" instead of "vertically"?

[Edited by - tom_mai78101 on May 11, 2010 3:15:42 AM]
0

##### Share on other sites
You shouldn't need to flip an image horizontally with the loading library. You will probably have to use something else if you really need that functionality.
0

##### Share on other sites
Thank you for this great library. I ripped out 2 pages of code from my old and clunky image loader (based on SDL_image) and replaced it with SOIL.

It compiled, linked and worked as expected on the first try! :)

0

##### Share on other sites
Hi, I am working on redhat.
Can someone exactly tell me how to link the library.
I put libSOIL.a in /usr/lib folder and SOIL.h file in /usr/include folder.

I included this line in my C++ program #include <SOIL.h>

On compiling it gives the following errors:

/tmp/cc1dkSnQ.o(.text+0x166): In function glutDisplay()':
/tmp/cc1dkSnQ.o(.text+0x17d): In function glutDisplay()':
: undefined reference to SOIL_last_result'
collect2: ld returned 1 exit status

Can someone please tell me what's wrong?
0

##### Share on other sites
Quote:
 Original post by wittyametaHi, I am working on redhat.Can someone exactly tell me how to link the library.I put libSOIL.a in /usr/lib folder and SOIL.h file in /usr/include folder.I included this line in my C++ program #include On compiling it gives the following errors:/tmp/cc1dkSnQ.o(.text+0x166): In function glutDisplay()':: undefined reference to SOIL_load_OGL_texture'/tmp/cc1dkSnQ.o(.text+0x17d): In function glutDisplay()':: undefined reference to SOIL_last_result'collect2: ld returned 1 exit statusCan someone please tell me what's wrong?

How are you invoking gcc? You'll probably need (iirc) a -LSOIL.

0

## Create an account

Register a new account