SOIL Library Linking Errors

1.6k views Asked by At

I'm trying to use the SOIL library with freeglut and glew. I'm using Visual Studio 2012 on a Windows 8, 64bit laptop. I'm getting these errors:

1>libSOIL.a(stb_image_aug.o) : error LNK2019: unresolved external symbol __alloca referenced in function _stbi_zlib_decode_noheader_buffer
1>libSOIL.a(image_helper.o) : error LNK2019: unresolved external symbol _sqrtf referenced in function _RGBE_to_RGBdivA2
1>C:\Users\UserName\documents\visual studio 2012\Projects\VectorTest\Debug\testSOIL.exe : fatal error LNK1120: 2 unresolved externals

I found a lot of other SO questions about linking to the SOIL library, but none worked for me. Some suggested linking in other libraries (but those seemed to be gcc specific - it was libgcc.a), others suggested building the SOIL library again.

The source code contains projects for vc6 through vc9. I built the vc9 project and tried using it - it didn't work. When I tried to build my program, it said 'The application was unable to start correctly (0xc000007b)'. I tried making a new static library project with the source code and building that, but I got the same 0xc000007b error.

It seems that this 0xc000007b error is characteristic of using a 32bit library on a 64bit computer or vice versa. However, the SOIL library doesn't come in a 64bit/32bit mode. I've tried compiling for x64 instead of x86 but that didn't seem to work either.

What do I need to do in order to get this working?

0

There are 0 answers