LNK1104 cannot open file 'legacy_stdio_definitions.lib' - c++

I've ported my project from vs 2012 to vs 2015.
The Library i'm consuming is also built from vs 2015.
I build my project using makefile and getting this error
LNK1104 cannot open file 'legacy_stdio_definitions.lib'
if i build the same in vs 2012 , it works fine.
What this error is all about?

Try opening the project in Visual Studio, then click Project at the top menu bar. Click "Properties", "Linker", and then "Input". In "Additional Dependencies", click the down arrow beside and click "Edit". Add "legacy_stdio_definitions.lib" and click "OK", then "OK".

Related

LNK1104 cannot open file boost_thread-vc140-mt-gd-1_61.lib

I am using Microsoft Visual Studio Professional 2017, Version 15.9.25
Visual C++ 2017 - 00369-60000-00001-AA984
ASP.NET and Web Tools 2017 - 15.9.04012.0
ASP.NET Core Razor Language Services - 15.8.31590
ASP.NET Web Frameworks and Tools 2017 - 5.2.61435.0
When I compile the project I'm getting:
1>LINK : fatal error LNK1104: cannot open file 'boost_thread-vc140-mt-gd-1_61.lib'
I've searched all the files in the Project folder and I can see no reference to this file, I am using Boost 1.61 and all I can see in the boost folder is:
c:\boost\boost_1_61_0\stage\lib\boost_thread-vc120-mt-1_61.lib
How do I change the project settings to get it to use the correct file?
Open the project properties, right click Project in Solution Explorer
From the Configuration Properties click on the Platform Toolset and change the setting to Visual Studio 2013 (v120)
Click on the OK button.
Clean project and rebuild.

How to select an older compiler in Microsoft Visual C++ 2019?

As written here, under "Project Settings" I should be able to specify the compiler to be used for the current project. However, I cannot find this menu entry in Visual Studio 2019.
I have both Visual C++ 2019 and 2013, and would like to use the new IDE with the old compiler. How can I do it?
Is it possible to do it with the "Community" editions?
Here are the official instructions, taken from this page:
In Visual Studio, in Solution Explorer, open the shortcut menu for
your project (not for your solution) and then choose Properties to
open your project Property Pages dialog box.
In the Property Pages dialog box, open the Configuration drop-down
list and then select All Configurations.
In the left pane of the dialog box, expand Configuration Properties
and then select General.
In the right pane, select Platform Toolset and then select the
toolset you want from the drop-down list. For example, if you have
installed the Visual Studio 2010 toolset, select Visual Studio 2010
(v100) to use it for your project.
Choose the OK button.
You can see a screenshot of my window below:

Please select a valid startup item

I have migrated from Visual Studio 2008 to VS 2017.
I am getting this error when I try to run project with the green play button:
Obviously I have to select a valid startup item, but there are two pieces of information I need to do that:
what are typical valid startup items that I can try to select?
How do I select them?
I am a long time developer, but I am new to visual studio so please give me instructions based on terminology I can see on the screen.
It might be the case that you have opened your project using
File->Open->Folder
Use the right method to open your project using
File->Open->Project/Solution
or
File->Open->Website
File > New > Project From existing code. Select type of project > Next. Enter project name > Finish.
I went to File > Open > project/Solution and found the ".sln" file. I clicked on it and then pressed open and it worked for me. Just spent ages trying to figure this out!
Regards,
Open Visual Studio ------------------
Click File
Click Open
Open as Web Sites
Another method
Click File
Click Open
Open as Project
I found this question after I did File → Open → Folder as well. However in my case it's not a website, all I have is a source file. I don't want to create a full solution.
Now that Visual Studio supports CMake (to some degree), easiest is to add a simple CMakeLists.txt file, like this:
project (theproject)
add_executable (thetarget source.cpp)
As soon as the folder contains this file, Set as Startup Item turns up as a menu item in the Solution Explorer!
The only solution is that or this error:
please select a valid startup file is that repair your visual studio
double click on visual studio installer and then click on the More then repair your visual studio

Using Visual Studio 2012 IDE, but compile with Visual Studio 2008

Where I work, we are stuck on VS2008 and will be for quite some time as converting the projects/solutions and integrating them back into our build process would take significant time; we're planning on moving to 2013 at some point though. However, I use VS2012 at home and love a lot of the features in the IDE that are missing in 2008.
I've read that you can use 2012 as an IDE and build with the 2008 compiler, but I can't find details on how this is accomplished. Any ideas? If I open one of the masterbuild files in 2012, it inevitably asks to convert them to the 2012 format, which I really don't want to do.
Thoughts? Thanks!
Yes it is possible as can be found on the Visual Studio site. However, I believe it will only give you options of the versions you have currently installed on the machine in question.
Here are the steps as laid out in the link, provided here to ensure the information link does not get broken:
(authored and published by Microsoft)
To change the target Framework
In Visual Studio, in Solution Explorer, open the shortcut menu for your project and then choose Unload project. This unloads the project (.vcxproj) file for your project.
Note: A C++ project cannot be loaded while the project file is being modified in Visual Studio. However, you can use another editor such as Notepad to modify the project file while the project is loaded in Visual Studio. Visual Studio will detect that the project file has changed and prompt you to reload the project.
On the menu bar, select File, Open, File. In the Open File dialog box, navigate to your project folder, and then open the project (.vcxproj) file.
In the project file, locate the entry for the target Framework version. For example, if your project is designed to use the .NET Framework 4.5, locate v4.5 in the element of the element. If the element isn't present, your project doesn't use the .NET Framework and no change is required.
Change the value to the Framework version you want.
Save the changes and close the editor.
In Solution Explorer, open the shortcut menu for your project and then choose Reload Project.
In Solution Explorer, open the shortcut menu for your project and then choose Properties. In the Property Pages dialog box, in the left pane, expand Common Properties and then select Framework and References. Verify that Targeted framework shows the new Framework version.
To change the project toolset
In Visual Studio, in Solution Explorer, open the shortcut menu for your project and then choose Properties.
In the Property Pages dialog box, open the Configuration drop-down list and then select All Configurations.
In the left pane of the dialog box, expand Configuration Properties and then select General.
In the right pane, select Platform Toolset and then select the toolset you want from the drop-down list. For example, if you want to compile with the Visual Studio 2010 toolset, select Visual Studio 2010 (v100).
Choose the OK button.
Try to use CMake. It could manage out of source build. You could create a VS2012 for edit and another VS2008 based for compiling. The source will be common.
From Visual Studio 2012 Compatibility page on MSDN
Some solutions, projects, files, and other assets that you created in
Visual Studio 2010 Service Pack 1 (SP1) will run without modification
in Visual Studio 2012, but others have to be upgraded.
If your original project is 2008 then you won't be able to use it in 2012, sorry.

Visual Studio 2010 resource tree doesn't open

I'm having a problem with visual studio 2010 in that I have a MFC project I've made which includes a dialog box. However when I go to the resource view, I can see the .rc file (I can't see the .rc2 file, which is listed in the solution explorer) but when I click on it, it doesn't open into the expected ICON, DIALOG, MENU etc.
The project runs and compiles fine, but I just don't get why I can't get to the dialog to edit it.
Thanks
James