1

This is a question to a specific answer given for this question. In trying to get Qt 5.0.2 64-bit version to build my project inside Microsoft visual studio 2012 on the Windows 7, 64-bit PC. I suspect that I've got a 32-bit version of the library even though it claims to be a 64-bit version. In any case, to get to the point:

In this answer: https://stackoverflow.com/a/4364020/2903608 and the following point: 4. Refers to the Path:

 Tool > Options, Project and Solution > VC++ Directories

However, in Microsoft visual studio 2012 that tab contains the following information:

"VC++ Directories editing in Tools > Options has been deprecated.

VC++ Directories are now available as a user property sheet that is added by default all project. Please click '?' for more information."

Unfortunately, it is not possible to click anything within the tab to reach that 'more information'.. So I turn to Google for further information and came upon the following long winded page (see bullet at bottom): http://social.msdn.microsoft.com/Forums/vstudio/en-US/a494abb8-3561-4ebe-9eb0-6f644a679862/visual-studio-2010-professional-how-to-add-include-directory-for-all-projects?forum=vcgeneral, which I believe I can summarise by the following question: Is the deprecated path that I'm looking for accessible here:

PROJECT > project_name Properties, Configuration Properties > VC++ Directories

If that's the case, I have tried modifying the entry for "Executable Directories" but it appears to have no visible effect. Even if I butcher that entry with a clearly invalid choice, there is no apparent difference to the error message.

The same source also contains the suggestion:

"VC++ Directories are no longer supported in VS2010 through Tools->Options page. 
Instead, VS2010 introduces the user settings file (Microsoft.cpp.<Platform>.users.props) 
to control global settings including Global search path. These files are located at 
$(USERPROFILE)\appdata\local\microsoft\msbuild\v4.0 directory. Upon migration to VS2010, 
the custom settings of VC++ Directories from VS2005 or VS2008 are migrated to these user 
files. These global settings files are imported into all the converted and newly created projects."

But when I attempt to follow the path described above, I only get as far as \local\Microsoft\ so that appears to be a dead end.

Community
  • 1
  • 1
PhilPhil
  • 173
  • 4
  • 18
  • The linker never gets this wrong, you really do try to link an .obj or .lib that was built to target a 32-bit operating system. The VC++ Directories setting just doesn't have anything at all to do with that problem. If you think it is finding the wrong .lib then just type the full path instead of just the name of the .lib – Hans Passant Oct 23 '13 at 13:26
  • Thank you, you were absolutely correct that it did not relate to my problem. A nonintuitive error from Qt plug-in of Visual Studio 2012 fooled me into thinking the 64-bit library was 32-bit. – PhilPhil Oct 30 '13 at 14:57

1 Answers1

0

This made it when i had the error:

First, check that your properties options in your linker settings at: Properties > Configuration Properties > Linker > Advanced > Target Machine. Select MachineX64 if you are targeting a 64 bit build, or MachineX86 if you are making a 32 bit build.

More on the topic here http://msdn.microsoft.com/en-us/library/21ksa10x.aspx

kiriloff
  • 25,609
  • 37
  • 148
  • 229
  • I think this should normally sort the error that I saw. Although mine was a special case where something else was the actual source of the error. – PhilPhil Aug 06 '14 at 11:02