There are similar questions on SO but they do not exactly anwer my problem: I have VS2017 Community Edition and atls.lib is missing in the filesystem.
Q1: My project compiles a plain C++ CLI-application, no MFC or the like. Why does it want to link to atls.lib?
Q2: I have read that one can add atls.lib to Linker->Input->Ignore_Specific_Default_Libraries but how would I do that via CMake where I do not have that dialog?
[x] solved:
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /NODEFAULTLIB:atls.lib")
did the job. And atls.lib can be installed via the Visual Studio installer. It's just a bit strange because the VS installer seems to belong to VS2019 but it works for VS2017 and VS2019.
Related
I develop an application using Visual Studio 2015 + Qt VS Tools extension. For me it's first time I used Qt (version 5.14.1) in my project. Everything was working fine until something wrong happened.
I was asked to make release version of my application, it worked fine on Windows 10 and Windows 7 64-bit systems. Then I set the project configuration back to Debug x64 to continue my work. First strange thing I noticed - when I double-clicked on *.ui form files in my Solution Explorer, Visual Studio crashed and reloaded without any error, Qt Designer doesn't launch.
What I tried:
First I tried to open Qt Designer externally (from bin folder in Qt directory) and open my form - it worked.
I tried another project made in VS 2015 + Qt VS Tools Extension - same problem.
I tried to remove my Qt Version and re-add it. And here it comes: Error screenshot. It also occurs without using system enviroment variable $(QTDIR).
I reinstalled Qt to my PC (installed version 5.14.2 instead of 5.14.1), same error.
I reinstalled Visual Studio 2015, same error.
I tried to reset my Visual Studio settings and parameters to default, no results.
I installed Visual Studio 2019. The problem is still present.
UPD:
I cleared Visual Studio cache according to these instructions. It didn't work for me.
I removed every Visual C++ Redistributables from my PC and installed the latest version from Microsoft site. It also didn't work.
The error occurs even if no project is opened, so the problem is caused either by Visual Studio 2015, by Qt 5.14, or by Qt VS Tools extension.
P.S. Sorry if my english wasn't perfect. Waiting for any ideas on fixing this problem.
For any future readers who have this problem, start your maintenance tool or Qt installer, e.g. C:\Qt\MaintenanceTool.exe, "Add or remove components", and then make sure Qt/<version>/MSVC is installed, as shown in the image below:
.
Then you'll be able to select that Qt version instead of MinGW, since the Visual Studio extension only supports the MSVC compiler and not MinGW.
Encountered the exact same problem and the only solution I have found was reverting to an older version of the Qt Visual Studio Tools extension.
Visual Studio has been painfully persistent about updating the version even once I installed an older one, so make sure to disable automatic extension updates (Extensions → Manage Extensions → Extension Settings → Uncheck Automatically search for updates/Automatically update extensions).
Hope it helps.
To solve your problem, you need to remove the QTDIR and QMAKESPEC environment variables that remain in Windows after installing older versions of Qt.
Well, after some more procedures that didn't help, I just did clean-reinstallation for my Windows 10. Fortunately, that helped :)
I try to work with socket.io in C++ but I can't seem to get the example running.
First it asked me to convert the project to my visual studio (which is 2015). So I did that. Then it was missing libraries offcourse (boost, websocket++, rapidjson). So I added them to the additional libraries in the project settings. Then it was searching for boost.lib. Boost.lib doesnt exist in the boost library I installed on my pc, so I deleted it from the dependency list. I figured I already included boost, why would it search for a lib that doesn't exist. I ran bjam.exe and b2.exe etc from boost, so if there would be a boost.lib it should be there I guess and it isn't.
I then got this error: https://msdn.microsoft.com/en-us/library/f6xx1b1z.aspx
So I added msvcrt.lib and msvcmrt.lib to the linker's Additional Dependencies property. Which caused the errors in the included image..
Now all the steps seemed to fix the problems I had, but also create more errors in the process. I do not understand how to run a project like this and I can't find a good explanation of the steps I need to take.
Can anyone explain what I am doing wrong?
https://github.com/socketio/socket.io-client-cpp
That is what I try to run, the included SioChatExample
Thanks for any help in advance!
Current errors..... :(
i think many errors because of VC++ version.
creator of project Socket.io-c++, he used VC++ 11.0
if you use VC++ 14.0 to build it, you will get the error. for suggestion you should use VC++ 12.0
In cast you want to use prebuilt libraries:
i myself just try many solutions,
goodness i fix all
you can get them here Prebuilt-libraries-for-Socket.io-c++
for Visual Studio 2015, what u need are:
install more Visual Studio 2013 (i install Visual Studio 2013 community) to get VC++ 12.0 (prebuilt-lib is built in VC++ 12.0)
change your project Platform Toolset to Visaul Studio 2013 (v120)
link libraries to your project
libraries you need are:
libboost_date_time-vc120-mt-gd-1_50.lib
libboost_random-vc120-mt-gd-1_50.lib
libboost_system-vc120-mt-gd-1_50.lib
sioclient.lib
include folder of *.h (header of Socket.io-C++) to your project
build and run
Hi I have updated visual studio to 2015 version and I have Qt msvc2013. Qt says that no compilers can make code for this version of Qt, (Qt detected compilers from visual studio). How can I make it working without installing VS2013?
You cannot mix C++ compiled with different major versions of the Microsoft Visual C++ compilers. So you need to either get a version of Qt for Visual Studio 2015, or compile your own one.
At this time, there is not yet an official build of Qt for Visual Studio 2015 available (this is planned for Qt 5.5.1 5.6.0). If you want to try compiling yourself, https://wiki.qt.io/Building_Qt_5_from_Git is a comprehensive guide. You should try either the 5.5 branch (if you get the Qt sources from git), or the 5.5.0 source packages. You should be able to get help e.g. on the qt-interest mailing list.
Adding a new mkspec is pretty simple, just copy the win32-msvc2013 and rename it to win32-msvc2015, then modify and use that one.
Second thing to do is not try to link against 2013 built libraries. If 2015 follows the same pattern as the older one, mixing libraries from different VS version is not possible.
Last thing, before adding icu, OpenSSL and MySQL you rather try to build Qt with the default parameters.
Qt's current development version is 5.6.
It is in beta and there are prebuild binaries for msvc2015.
Link to Qt Development Binaries
With Visual Studio 2012 Update 1 released, I am hoping to build a C++ project to support Windows XP. Is there a way to use CMake to generate a project that targets Windows XP? Basically CMake would need to generate a project file that uses Platform Toolset = Visual Studio 2012 - Windows XP (v110_xp).
According to http://www.cmake.org/Bug/view.php?id=10722 the answer is now (soon) yes.
Fixed in Version CMake 2.8.11
A new "generator toolset" feature has been added here:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7dab9977 [^]
One may now run CMake from the command line with
-G "Visual Studio 10" -T "v90"
in order to build with a specific toolset. We've not yet added a
first-class interface to cmake-gui for this, but one may add the cache
entry "CMAKE_GENERATOR_TOOLSET" to contain the "-T" value before
configuring.
According to http://www.cmake.org/Bug/view.php?id=10722 the answer is no yes.
Update: The bug mentioned above has been resolved with the following comment:
Fixed in Version CMake 2.8.11
A new "generator toolset" feature has been added here:
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7dab9977 [^]
One may now run CMake from the command line with
-G "Visual Studio 10" -T "v90"
in order to build with a specific toolset. We've not yet added a
first-class interface to cmake-gui for this, but one may add the cache
entry "CMAKE_GENERATOR_TOOLSET" to contain the "-T" value before
configuring.
You might also look at the comments made to the other answers.
I think you can just generate a Solution for Visual Studio 2010/2012. Open this solution, open the solution/project in visual Studio, open the properties and reconfigure the Platform toolset to v110_xp.
Then you should be fine. But I'm still searching for the solution how to setupo the command line to build v110_xp programs...
I think the best way to address this problem is use CMake to build your project for Visual Studio 2010 and then open the project with Visual Studio 2012. When you do this the toolset used will be vs2010, which works for WinXP.
On my computer (Win7 32, VS2010 Ultimate) I would like to use Qt Creator and Qt Visual Studio add in, both LGPL versions.
There are minGW and VS2008 versions of Qt frameworks on the Nokia websites, I did not find VS 2010 version.
So I have installed Qt 2010.05 SDK and in the VS 2010 Command prompt the following steps have been performed:
configure -static
nmake sub-src
I checked Qt Creator and it successfully runs. After the translation has been finished I installed VS 2010 add I tried to add new Qt version int the path
C:\Qt\2010.05\qt
But the following error message has been appeared:
Qt in the given path was built using minGW
It do not understand why because the translation has been performed for the VS2010.
Where is the error? How to install it correctly?
I found out from a German Qt forum that, VS add-in looks for libqtmain.a and libqtmaind.a files to determine if it is built with MinGW. Guess what? Qt ships with those files.
Delete them, and you will be fine.
FWIW, The Vs2008 version works fine with VS2010. I didn't need to build it or anything. You can install that and then just run the latest version of the VS plug-in installer and you should see the Qt menu options in VS2010.
AFAIR your command line is incomplete: I remember one had to specify the build platform. It could be that it's using mingw to build Qt since you didn't specify the VS version in the parameters. The following post might be of interest to you: Building Qt 4.5 with Visual C++ 2010