1

NOTE: I am using Visaul C++ 2010

I have been working on an OpenGL project and decided to download SOIL, which is a library for loading textures in OpenGL.

Link: http://lonesock.net/soil.html

The issue is that I get 2 LNK2001 errors listed below when I call the function SOIL_load_OGL_texture()

1>SOIL.lib(stb_image_aug.o) : error LNK2001: unresolved external symbol __alloca
1>SOIL.lib(image_helper.o) : error LNK2001: unresolved external symbol _sqrtf

I have read various articles, and tried various solutions such as excluding some of the default libraries for VC++ which seems to be a common one but it hasn't worked for me.

I have included the header and added the SOIL.lib to additional dependencies.

genpfault
  • 51,148
  • 11
  • 85
  • 139
Nick Ellas
  • 97
  • 7
  • possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?: Failing to link against proper libraries](http://stackoverflow.com/a/12574400/902497). You need to add the libraries that define `_alloca` and `sqrtf`. – Raymond Chen Jun 06 '13 at 19:10
  • possible duplicate of [What is an undefined reference/unresolved external symbol error and how do I fix it?](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – Robert Rouhani Jul 07 '13 at 00:50

1 Answers1

0

I fixed it! I just had to compile the source into a .lib and it worked fine( I was using the supplied library before).

Nick Ellas
  • 97
  • 7