vs 2015:problems with linking SOIL lib.

Started by
3 comments, last by EarthBanana 7 years, 10 months ago

hi

i created a program in 2012 on vs 2012. it ran perfectly then, now, i want to rebuild it with vs 2015. in this program, i used Opengl and SOIL.

apparently, i have trouble in linking the files. here are some of the linking errors that i encountered:

Severity Code Description Project File Line Suppression State
....
Error LNK2001 unresolved external symbol _sqrtf Fractals2012 D:\C++\Fractals2012\Fractals2012\SOIL.lib(image_helper.o) 1
Error LNK2001 unresolved external symbol __alloca Fractals2012 D:\C++\Fractals2012\Fractals2012\SOIL.lib(stb_image_aug.o) 1
I recently download the SOIL library and renamed it from libSOIL.a to SOIL.lib and setup the linked library.
your help is appreciated.
Advertisement

You should likely remove the warnings from your posting, since they do not relate to your question.

First off, how are you including the opengl32.lib and I assume SOIL.lib?

You give us next to no information, a bit more would go a long ways :)

Also, you cannot just change it from .a to .lib, it doesn't work that way. Download the correct version. Google is your friend here instead of waiting hours upon hours for a reply.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

hi Mike2343,

thanks for your reply.

I included the opengl lib by going to tool > package manager and then typed nupengl.core to include the opengl package. I had successfully build a small opengl program with this method.

in the SOIL download site, it told me to rename it to .lib from .a and that is all they included, no .lib file.

the soil website is http://www.lonesock.net/soil.html.

I had not been programming since 2012, so i am a little rusty here :(

hi

I found the solution. after some digging, i built soil.lib from a soluton file in the zip package. now it run fine now.

BTW, anyone know how to run a project without building it? I built a project, i just dont need to rebuild it to run it.

thanks

Soil is small enough it may be worth it to simply include the source in your project

This topic is closed to new replies.

Advertisement