SOIL Library Linking Errors - c++

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?

Related

Visual Studio Project doesn't build when using MFC

I am building a small game and I would like to show off my progress to my friends by sending them the game.
When trying to send them the Release folder after building it they get the error that they're missing a Visual studio library. I read that I need to create a static MFC library but when I do so my project won't build.
My project is in /MT modus or whatever it is.
Should add Debug mode still builds fine!
It gives me one LNK1120 error message and a lot LNK2001 error messages.
Errors:
Error: LNK1120 70 unresolved externals
Error: LNK2001 unresolved external symbol
I don't know what I'm doing wrong. It's my first C++ project.
Any help is appreciated!
Thanks in advance.

Trying to install SDL2 to run with visual c++, works with 32bit libs but not 64bit

I've been trying to setup Visual studio to work with SDL2, but I've encountered a problem. I've done all the linking and stuff, and everything works fine if I link the x86 libs.
However, if I only change this bit, meaning I link to the x64 libs (I'm on windows 8 64 bits)
everything stops working. That's the errors I get :
Source.obj : error LNK2019: unresolved external symbol _SDL_Init referenced in function _SDL_main
and other similars, and a last one, a bit different :
1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external symbol _main referenced in function ___tmainCRTStartup
I really don't know why, since I didn't change a bit of code going from 32 to 64, if anyone has a solution, otherwise I'll juste use the 32bit libs...
If you need additionnal information I can gladly provide.

Visual Studio 2010 : error LNK2001: unresolved external symbol : sapi.h and Microsoft Speech SDK for KINECT

I'm encountering a strange bug in Visual Studio 2010...
I work with the Kinect for Windows SDK v1.8 on VS 2010 Ultimate, for a speech recognizer program using the MS Kinect.
Like it's explained in the sample SpeechBasics (available on Kinect Developer Toolkit Browser), I added the specifics VC++ include and library paths into my project properties, before listing the default system include and library directories.
But When I buid the solution, I get the following errors :
CKinect_Squeletton.obj: error LNK2001: unresolved external symbol _SPDFID_WaveFormatEx
CKinect_Squeletton.obj: error LNK2001: unresolved external symbol _CLSID_SpStream
CKinect_Squeletton.obj: error LNK2001: unresolved external symbol _CLSID_SpInprocRecognizer
CKinect_Squeletton.obj: error LNK2001: unresolved external symbol _CLSID_SpObjectTokenCategory
build failed.
I had checked all my include files, all my project properties. I did a lot of research, and tested many possibilities of response, but I hadn't found response for my problem...
I have tried cleaning the solution, build with a x64 target architecture, but that doesn't always work.
Why have I this problem ?
Like suggested in the comment, I've checked the link on social MSDN
I've resolved some errors but not all in using __uuidof(SpStream) instead of CLSID_SpStream , and __uuidof(SpInprocRecognizer) instead of CLSID_SpInprocRecognizer .
But i don't found CLSID_SpObjectTokenCategory in my code, I have only
ISpObjectToken *pEngineToken = NULL;
hr = SpFindBestToken(SPCAT_RECOGNIZERS,L"Language=40C;Kinect=True",NULL,&pEngineToken);
I can't replace it with __uuidof(SpObjectTokenCategory) .
Also, I always don't know how to resolve the error
CKinect_Squeletton.obj: error LNK2001: unresolved external symbol _SPDFID_WaveFormatEx
I've added sapi.lib in Project + Properties, Linker, Input, and I also try with #pragma comment(lib, "sapi.lib")
I have resolved my problem !
I work on Windows 7 64bit, and I had installed MS Speech Platform SDK 11 x64.
But to build with a x86 target architecture , I had to install and use MS Speech Platform SDK 11 x86, and specify in my project properties the path for the x86 sapi lib !
The compiler gave me errors when I've tried to build with a x64 target architecture, because others specific libraries that I have included in the project are for a x86 architecture...
Sorry and maybe this solution will help someone one day !

PCL cloud visualization Visual Studio 2010

I am trying to build this simple visualization example using VS2010:
http://pointclouds.org/documentation/tutorials/pcl_visualizer.php
I have linked all .lib files (both pcl and 3rdparty) however I get a bunch of unresolved external symbol errors all of which are happening on vtkRendering-gd.lib and seem to be OpenGL related like the following:
vtkRendering-gd.lib(vtkOpenGLTexture.obj) : error LNK2001: unresolved external symbol __imp_glPopAttrib
vtkRendering-gd.lib(vtkOpenGLRenderer.obj) : error LNK2001: unresolved external symbol __imp_glPopAttrib
vtkRendering-gd.lib(vtkOpenGLRepresentationPainter.obj) : error LNK2001: unresolved external symbol __imp_glPopAttrib
vtkRendering-gd.lib(vtkOpenGLLight.obj) : error LNK2001: unresolved external symbol __imp_glPopMatrix
I am on a x64 Windows 7 machine, and I have installed the x64 version of PCL using the all-in-one installer.
Thanks for your help.
in the http://www.pointclouds.org/ it says that the visualization library is ment to work in Qt. It might be using Qt GUI features .any way I suggest you check if your error is coming from it.
(although I know that you could define your own GUI with other engines like opengl)
I'm using VS10 + Win64 + pcl with no issues. But I used another way of installation.
I installed dependencies (http://www.pointclouds.org/downloads/windows.html) from column Windows MSVC 2010 (64bit)
In particular:
boost 1.50.0
Eigen 3.0.5
FLANN 1.7.1
VTK 5.8.0 with Qt support
Qt 4.8.0
QHull 2011.1 (6.2.0.1385)
OpenNI OpenNI 1.5.4 (patched)
OpenNI Sensor 5.1.0 (patched)
After installing them one after another I followed instructions on this page http://pointclouds.org/documentation/tutorials/compiling_pcl_windows.php#compiling-pcl-windows
And I had no problems, everything is working fine.
You are missing opengl32.lib
Add it to Properties->Linker->Input->Additional Dependecies

Setting up SDL in Visual Studio with Errors

I have been having this issue for a very long time, I have not even had no luck and it is becoming very frustrating. I am really itching to create games in C++ with OpenGL/SDL. I am using Microsoft Visual Studio Ultimate 2012. My Operating System is a 64-bit Windows 7.
I had no troubles setting up OpenGL with Visual Studio, but SDL is the main problem. I follow lazy foo tutorials, I looked at YouTube videos, god damn it is irritating. The error I am getting when debugging SDL in Visual Studio is:
1>SDLMain.obj : error LNK2019: unresolved external symbol _SDL_Init
referenced in function _SDL_main 1>SDLMain.obj : error LNK2019:
unresolved external symbol _SDL_Quit referenced in function _SDL_main
1>MSVCRT.lib(crtexew.obj) : error LNK2019: unresolved external symbol
WinMain#16 referenced in function __tmainCRTStartup
I do not know what you mean by building the libraries by myself, but I did link the SDL Library. I switched from x64 to x86 and when I debugged my code again I got this message:
The application was unable to start correctly (0xc000007b). Click OK to close the application.
So your saying if I downloaded an earlier version of Visual studio, I can run SDL without a problem?