SOIL set-up in Visual Studio 2010

…衆ロ難τιáo~ 提交于 2019-12-04 05:08:09

It sounds like you didn't actually put SOIL.lib in your Properties -> Linker -> Input -> Additional Dependencies list.

The FreeGLUT header has some Win32-specific #pragmas to pull in the proper .lib files, which is why just setting the Additional Library Directories worked for that. SOIL doesn't have those so you have to specifically tell the linker which .lib to use.

May be it's little old thread, still I will share something.

  1. Download the zip from http://www.lonesock.net/soil.html and unzip it.

  2. In your visual studio project include path (project -> properties -> vc++ directories -> include directories) add the path to "src" folder of Soil. Same place of -> library directories add the "lib" folder. project -> properties -> Linker -> Input -> Additional Dependencies -> Edit to add "SOIL.lib"

  3. This step is important as people tend to rename that .a file to .lib. Don't do that. Instead go inside "projects" folder, select a VC* (eg VC8 for VS2012) -> open the visual studio file -> it will open using your visual studio -> click ok -> click ok. Your solution will be Ready.

Now press F5/Run to build and Run. Be careful while doing it, in case your project is using a x64 Debug version then in here select the same before you build the solution.

  1. There will be folders/files created in the VC* folder. Go inside Debug/x64 (dependent on your project), copy the SOIL.lib file to original "lib" folder (you pointed to in Visual Studio Properties in step 2).

At this point, you are done. It should work.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!