Part of the Khronos Group
OpenGL.org

The Industry's Foundation for High Performance Graphics

from games to virtual reality, mobile phones to supercomputers

Results 1 to 2 of 2

Thread: SOIL library , how to use

  1. #1
    Junior Member Newbie
    Join Date
    Jul 2011
    Posts
    9

    SOIL library , how to use

    Hello,

    Can anyone give me detailed instructions to use SOIL library ?

    I am trying to use SOIL library to load image for the textures but my main program is not recognizing SOIL functions.

    1. I am moving all the files in my solution directory where my main.cpp also lives.
    2. Dragging all the header files in "Header files" folder of project.
    3. Dragging SOIL.c file in "Source files" folder of project.
    4. renaming libSOIL.a file to SOIL.lib and copying it to lib folder if Visual Studio.
    5. including SOIL.h in main.cpp

    but still main.cpp can not find SOIL functions.



    Thanks
    Chayan

  2. #2
    Senior Member OpenGL Guru
    Join Date
    May 2009
    Posts
    4,726

    Re: SOIL library , how to use

    4. renaming libSOIL.a file to SOIL.lib and copying it to lib folder if Visual Studio.
    If you're using Visual Studio, how did you even get libsoil.a to begin with? Did you not compile it with VS?

    In any case, you should have done none of those things. First and foremost, never touch anything inside of Visual Studio's directories!

    You should have built SOIL with Visual Studio. The download comes with Visual Studio projects. Then, in your actual project, add SOIL's include path to the list of include directories (remember to do this for debug and release builds). Add the SOIL library (that you built with VS) to the list of libraries to include (one for debug and one for release). Then everything should work.

    And people wonder why I use Premake in my tutorials...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •