I'm trying to compile a Qt 4.8.6 project with Visual Studio (I'm using the visual studio addin for Qt4.8.6). I compiled the libraries statically (-static) in debug and release mode (-debug-and-release) with no errors.
I'm receiving these errors:
QtGuid.lib(jaricom.obj) : warning LNK4099: PDB 'vc100.pdb' was not found with 'QtGuid.lib(jaricom.obj)' or at 'C:\MyProject\debug\vc100.pdb'; linking object as if no debug info
1>QtGuid.lib(jcapimin.obj) : warning LNK4099: PDB 'vc100.pdb' was not found with 'QtGuid.lib(jcapimin.obj)' or at 'C:\MyProject\debug\vc100.pdb'; linking object as if no debug info
Why is that and how do I solve it? I don't want to just ignore it.
First of all these are warnings and not errors, secondly looks like you linking Debug version of Qt libraries with release profile of VC libs… Something wrong with Build Profile… But it is just warning, and if you don’t need debug facilities of VC components you can just ignore this warning….
If you use VS2010 compiler and will use win SDK components and to not have any kind of problems with dependencies between VC you use, dependencies of Qt(which is compiled with mingw!?) etc… Just download Qt sources, compile them with your VS, install VS Add-in and use Qt in in VS...
The linker cannot find the debug info for the library QTGuid. If you want to debug your application you won't get source-level debug from QTGuid.
To solve this you must ensure that the pdb-files are installed ( install Qt with debug information ) and make sure that the files are in a path where Visual Studio is looking for pdb-files.
In my case, I had the warning because I had the following project settings:
Project->Linker->General->Enable Incremental Linking: Yes (/INCREMENTAL)
Solution: I changed the project setting and it worked:
Project->Linker->General->Enable Incremental Linking: Default