Qt add-in 1.2.4 visual studio 2013 bug - c++

enter image description herePC
qt-opensource-windows-x86-msvc2013-5.5.1 and the 64bit version of it
visual studio 2013 ultimate
qt add-in 1.2.4
windows 10 x64bit
problem:
when i create a qt project in vs and try to build it.
1- i get the error Qt5Widgetsd.lib(Qt5Widgetsd.dll) : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
note: the installed version of qt is the 64bit
2- the libraries and everything qt related isn't recognized in the IDE "uderlined red"
things i did to try and solve this problem
when i change the TARGET MACHINE to MachineX64 (/MACHINE:X64) instead of MachineX86 (/MACHINE:X86) (in project properties>linker>advanced) and the platform still as it was (win32)
vs recognize the qt things/libraries and the underlines goes, however when i build i get this error
Debug\moc_shitstackoverflow.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64'
when i change platform to x64
i get this error
the following error occurred: there's no qt version assigned to this project for platform x64. please use the "change QT version" feature and choose avalid qt version for this platform
and every thing get underlined again
so on an another failed attempt i uninstalled the 64bit of qt version and installed the 32bit one.
when i tried to build a newly created project in vs (under the 32bit) the project succeeded in building, however everything qt related was underlined red and the IDE don't recognizes it.
note* running vcvarsall.bat through qt cmd didn't change the underlining issue in vs in any of those cases!
so please i need help to this problem.
i tried everything i have found on the internet, but nothing solved the problem
so i wrote this very detailed explanation of what i have gone through the past 48 hours!
thanks in advance

Related

Visual Studio 2017 c++ - error project output 'Primary Output targeting 'AMD64' is not compatible with the project's target platform 'x86'

I'm trying to port a current working project to other computer, both are using the latest Visual Studio version and the project uses opencv library.
I've got two projects:
The project App, builds and works fine, I'm able to test it
in debug and release modes.
Setup project, to deploy the app ( which all work fine in the other
machine).
The targeting platform is x64 and the configuration manager setup is:
When I'm trying to build the Setup Project I've got the error:
ERROR: File 'Apptest.exe' of project output 'Primary Output from Apptest(Active)' targeting 'AMD64' is not compatible with the project's target platform 'x86'
If my project is clearly setup targeting 64bits, anyone knows or have any clues why I'm getting this error?
Thanks.

Module machine type 'x64' conflicts with target machine type 'X86'

I'm trying to compile a C++ program that depends on Qt 5.9.1 modules and got the following error message:
Qt5Widgets.lib(Qt5Widgets.dll) : fatal error LNK1112:
module machine type 'x64' conflicts with target machine type 'X86'
I'm using command line MSBuild (from Visual Studio Community 2017) on Windows 10 x64. As I learn from previous questions the problem seem to be that the Qt 5.9.1 modules are x64 where as the MSBuild assume that my program is x86. I've tried the most proposed solutions of running the compilation on the Developer Command Prompt, x64 Native Tools Command Prompt, x64_x86 Cross Tools Command Prompt, x86 Native Tools Command Prompt and x86_x64 Cross Tools Command Prompt. None of these works, and I still get the same error message. I'm not using the Visual Studio IDE, just the MSBuild on the command line with CMake and generator set to "Visual Studio 15 2017 Win64". I also learns that there is no known way to explicitly instruct MSBuild to do x64 build. Is there any other way to solve this? I'm missing something from previous answers? Is there a way to enforce this in CMake?

Issue while compiling in X64 with SFML in visual studio

When I try compiling my project in X64 I always have the same error :
LNK1112: module machine type 'x64' conflicts with target machine type 'X86
I've already test all the solutions I found but i can't figure it out
my VC++ directory is fine :
$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmf\lib\amd64;$(WindowsSDK_LibraryPath_x64);
I've properly link the 64 bits version of the SFML in the C/C++ menu and in the linker...
Do you guys know why it's still throwing this ?
Go to your project property page, in "Linker -> Advanced", switch "Target Machine" to "MachineX64 "

Building CUDA 5.5 with OpenCV 2.4.8

I am trying to build CUDA 5.5 with OpenCV 2.4.8 to make an x86 application.
I am running on Windows 8.1 64 bit using VS2012 C++/cli and am having crazy troubles getting my app to build.
I downloaded CUDA 5.5 Windows 8.1 64 bit for Desktop (it will not let me install 32 bit anyway).
Then, I did the following:
1) load CMake and set the target machine as Visual Studio 11 (not Win 64)
2) turn off CUDA BUILD ATTACH v RULE
3) configure and generate
4) load the ALL_BUILD project in Visual Studio specifying Win32
During the build, I get the following error:
6>CMakeFiles\cuda_compile.dir\__\dynamicuda\src\cuda\Debug\cuda_compile_generated_matrix_operations.cu.obj : fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'
Build FAILED.
It is my understanding that you have to compile everything to your target architecture and since mine is Win32 (because of other libraries), it would seem that I have to build OpenCV to that architecture as well.
What am I doing wrong?
Any help greatly appreciated.
I had the same problem and ended up compiling it with VS2010. See if that works.

OpenCV 2.4.6 Windows 7 Visual Studio 2012 64 bit installation error

I'm trying to install Opencv in my 64 bit computer and VS2012.
I did as this guy in the video says which is in my opinion a great explanation but I get an error which says Module machine type 'x64' coflicts with target machine type 'x86'.
So I tried changing 'x64' to x86 in additional library dictionaries , this time I get dll errors but I added those libraries that it gives error.
So is there anyone who solved this 64 bit problem in OpenCV can help?
Thank you.
Edit:
Now its building it in release mode but I have
OpenCVProject.exe' has exited with code -1073741701 (0xc000007b). Error
for me (visual studio 13 express) worked to change from the vc11 directory to the vc 10 directory.