Visual Studio 2015 OpenGL freeglut.dll Linker Error - c++

So I was playing around with the OpenGL and C++ in Visual Studio 2013 Pro (from dreamspark for students) and everything was fine. Then I decided to try out Visual 2015 Community. After upgrading and rebuilding the project, I'm getting the LNK1104 error with "cannot open freeglut.lib".
I've searched through the properties and everything seems fine. I originally installed OpenGL libs with PM by installing nupengl.core and adding #include"GL\glut.h". I tried to do some #defines as someone pointed out in this and this thread, but it's probably outdated by now and I'm not able to follow the instructions at some points. I reinstalled the nupengl.core too.
I'm not really fluent with Visual, I've been using it for like a year now and I'm trying my best to understand it more. If anyone has an answer, please make it as clear as possible. Cheers! :D
And of course, sorry for language mistake, as I'm not a native english speaker!

Resolution
Install the new version 0.1.0.1 of NupenGL and you shouldn't run into any issues. More details: http://mycodelog.com/2015/10/08/opengl-freeglut-in-visual-studio-2015/
Why NupenGL 0.0.0.1 had this issue?
The nupengl.core nuget package installs some files (header and lib) that are necessary to run your OpenGL GLUT application.
In its 0.0.0.1 version, it put out the lib files (including freeglut.lib) under the v120 folder. Visual Studio 2015 looks in the v140 folder.
To resolve the issue in that version, you could create another copy of the folder and name it v140, or change the "Platform Toolset" setting in your Visual Studio 2015 project from "Visual Studio 2015 (v140)" to "Visual Studio 2013 (v120)".
There is no need to do that though since this has been fixed in the 0.1.0.1 version of nupengl.core nuget package.
Github page for project: https://github.com/jcdickinson/NupenGL
Hope that helps.

Related

Visual Studio 2013, error MSB8020: The build tools for Visual Studio 2010 cannot be found

At the start I'd like to note that I've spent some time researching this issue and suggested solutions for similar questions like this one didn't help me.
Problem background
I need to migrate a Firebreath plugin project (which I haven't worked on previously) from PC_1 to PC_2.
As far as I'm aware the project was started on PC_1 on Visual Studio 2010 and later moved to Visual Studio 2013 Pro. There's one solution consisting of 19 projects. I have an instruction which says that in order to get the plugin installer I should first Build project_x and after that Build project_y_WiXInstall. Both steps work without any issues on this machine.
Then there's PC_2 which had Visual Studio 2015 Community installed before I started working on it. I've removed it, installed Visual Studio 2013 Pro (version 12.0.21005.1 REL - exactly the same as on PC_1), moved all of the needed files and I'm trying to get rid of all of the compilation errors. So far I figured out I had to install Cmake 2.8, Windows Driver Toolkit 7.1 and manually override an incorrect VCTargetsPath MSBuild variable
Problem description
Currently when I try to compile the project on the new machine I get these two errors (this is an image link since I can't embed images yet on this account). I'm not sure what's going on with the first error message since it looks incomplete and the file CUSTOMBUILD doesn't exist, but I'm not bothered by it too much since the previous compilation error I fixed also had a similar "artifact" as the first error and it disappeared after fixing the second one.
The covered part of the second error message is the project path. The error origin (Microsoft.Cpp.Platform.targets file, line 64) looks like this:
<!-- Error out if toolset does not exists in Visual Studio 2010 or 2012 -->
<VCMessage Code="MSB8020" Type="Error" Arguments="$(_CurrentPlatformToolsetShortName);$(PlatformToolset)" Condition="'$(ToolsetTargetsFound)' != 'true'" />
What didn't help
The error description suggests using an Upgrade Solution... option, but there's no such thing when I right-click the solution
As an accepted answer for the question I've posted at the start of my post suggests, I've checked the Properties of all 19 of my projects (including the project ZERO_CHECK) but their Platform Toolset is already set to Visual Studio 2013 (v120).
I've also tried changing the Platform Toolset to inherit from parent or project defaults for all of the projects. This resulted in it switching to Visual Studio 2010 (v100) (not installed) and after that I've right-clicked on the projects and chose Upgrade VC++ compiler and libraries. After this the Platform Toolset was back to the Visual Studio 2013 (v120) but it didn't help with the compilation error.
As a NON-accepted answer for the question I've posted at the start of my post suggests, I've tried searching for all of the occurrences of 10.0 and V100 in all of my .vcxproj files to replace them but I haven't found any occurrences of them.
[EDIT]
I just got an idea to try building the project with MSBuild from the command line. There's a bit more info compared to errors inside Visual Studio, so maybe it will help with resolving the issue: https://pastebin.com/JhN3dXM3
So the thing you're missing here is that FireBreath projects are built using CMake -- the actual contents of the build directory should always be completely temporary and never stored in source control. To build the project on a new computer you need to run the prep command again from scratch.
If the previous maintainer changed the build files manually and/or migrated it to a newer version of visual studio without using cmake to do it then they did some very ugly things and all bets are off... good luck.
This is why all the firebreath documentation (I wrote most of it) strongly urges that the build directory be transient and you always do project file updates in cmake.
Hope that helps!

AnkhSVN not showing in Visual Studio 2017

I cannot see AnkhSVN as an option under "Tools - Options - Source Control" in Visual Studio 2017. I have uninstalled and reinstalled AnkhSVN, but no effect.
Is there a way to fix this?
I came here looking for an answer to the same question. I am Running Windows 10 Enterprise and had VS2015 with AnkhSVN working before and after installing VS2017, but in VS2017 AnkhSVN was not available under SCC Plug-In Selection (even after uninstall and reinstall of the install executables downloaded from http://ankhsvn.open.collab.net, which offer registration against VS Dev15/2017).
This is what eventually worked:
Removed AnkhSVN (Windows: Add or Remove Programs)
Installed AnkhSVN Nuget package (Visual Studio: Tools/Extensions and Updates)
So the trick I believe is to "remove program installed by MSI/EXE followed by install extension via Visual Studio VSIX".
I was also subsequently able to upgrade AnkhSVN (2.7.12815 from VSIX install), by running the downloaded EXE installer for the latest daily build (2.7.12821), after which AnkhSVN is available in both VS2015 and 2017, although I had to reselect it in 2015.
I had the same issue with VS2017 and tried the solution provided by AlanK to no avail.
Here is the solution that solved the problem for me:
https://developercommunity.visualstudio.com/content/problem/119486/on-fresh-installation-extensions-are-not-working.html
Uninstall the source control plug-in.
Make a backup of the following files:
C:\USERS\USERNAME\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\15.0_XXXXXXXX\privateregistry.bin
C:\USERS\USERNAME\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\15.0_XXXXXXXX\privateregistry.user.bin
Remove these files:
C:\USERS\USERNAME\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\15.0_XXXXXXXX\privateregistry.bin
C:\USERS\USERNAME\APPDATA\LOCAL\MICROSOFT\VISUALSTUDIO\15.0_XXXXXXXX\privateregistry.user.bin
Start Visual Studio 2017.
Install the source control plug-in.
You have to install "Ankh.VS15Package.vsix" package along with AnkhSVN software in your system as the version of AnkhSVN that you are installing might be supporting only up to Visual Studio 2015 or less. I had the same issue and resolved it by installing the package mentioned.
I had a similar issue after one of the Visual Studio 2017 updates. I had Visual Studio running and I was attempting to follow #AlanK's steps. I uninstalled as in Step 1. When I did Step 2, VS said the plugin was installed already. I restarted Visual Studio, thinking it was confused about the fact I uninstalled via Add/Remove programs.
I checked again and the AnkhSVN plugin was shown as disabled. I enabled it and then AnkhSVN and VS 2017 started playing nicely again.
I read the answer from Snehlata Shaw, and I think what I uninstalled from Add/Remove programs is the 2015 and earlier version of AnkhSvn. I can't be 100% sure that uninstalling it did or did not help with the 2017 version.
In summary, make sure the plugin isn't just disabled. VS 2017 says (now that is enabled) that AnknSvn slows down startup by 6 seconds and perhaps I disabled it not realizing what I was doing (Monday morning??).

Trying to build a Qt application with VC++ compiler: 'type_traits': No such file or directory

Why doesn't the compiler find the file? It exists in the VC include directory for VS 14.0.
I've read that in previous versions of Visual Studio, you have had to install a service pack or something, is this a similar case?
I'm using VS 2015 Community.
This seems to be resolved by running vcvarsall.bat and starting Qt Creator from the same command prompt window.
I had this same problem in Visual Studio 2019 Community with Qt 6.0.0
after, searching every forum etc.. and trying the install of Visual Studio 2015 build tools x64 and Visual Studio redistributable 2015 x64 (which didn't solve the problem too),
I tried updating Windows sdk version from 10.0.18362.0 to 10.0.19041.0 and the problem was SOLVED.
I'm currently using Visual Studio Community 4.8.03761 if that might help others
so just check that you have Window sdk version 10 updated and that your compiler is well chosen (I had mvsc2019_64 and work with LLVM etc.. version in build settings) .
hopefully this helps you guys.

Still missing mscvpXXXd.dll after installed corresponding distribution package?

I have Visual Studio 2015 installed on my PC, and I have also installed Miscrosoft Visual C++ 2012/2013 Redistributable packages, both x86/x64 version. Here is my problem that I have only got msvcp110.dll/msvcp120.dll in my System32/SysWOW64 but no msvcp120d.dll/msvcp110d.dll, like below picture.
This makes me can only build some project in release mode. Also, I don't know what's those msvcp110_clr0400.dll/msvcp110_win.dll for.
Anyone knows why those msvcpXXXd.dll are missing? Thank you!

Installing Visual Studio 2010 AFTER Visual Studio 2012

I had Visual Studio 2012 installed on my new development computer and it worked fine. Without thinking I then installed VS2010 onto the computer which already had the 2012 install. 2012 continues to work correctly but 2010 cannot compile any of my previous working source code and it seems unable to locate any of the correct libraries.
For instance in a simple C++ hello world program I get the following error
fatal error C1083: Cannot open include file: 'iostream': No such file or directory
I have tried un-installing both, installing 2010 first then 2012 but the same problems still occur. I have also made sure it is using platform toolkit v100 but it seems to make no difference.
I have also tried repairing VS2010 to no avail.
Has anyone else experienced the same issues and if so how did they manage to fix it?
I'd guess it has something to do with VS2012's new v110_xp platform toolset which uses an SDK similar to 7.1. For my older projects that need 2003 Server and XP support I use that toolset now with VS2012 instead of the default toolset with VS2008 or VS2010 so I no longer need the older Visual Studios. It might solve your problem as well.