How can I work with c++ language in visual studio 2015? - c++

I have tried to run a c++ program in visual studio 2015 environment ,but it doesn't work and it shows me this pop-up window ( Unable to start program 'C:\Path...' . The system cannot find the file specified. ) .
I work with c# language in visual studio 2015 and it's fine , but with c++ it's not . There is 'Local Windows Debugger' button instead of ' Start' button .
I hope I could explain my problem and I hope you help me .
thank you in advance .

Create a new project with only ASCII letters in the project name and only ASCII letters in the source file name (e.g. mytest.cpp).

Visual Studio 2015 does not install C++ support by default. You have to select it in the Custom setup. See this blog post.
This was a partial step towards the 'new setup experience' in Visual Studio 2017 and later that's a lot less confusing and does a better job of keeping the disk footprint down to the portion that the developer actually needs. That said, the "UWP workload" also doesn't include C++ tools by default, you have to add "C++ tools for UWP" if targeting UWP with C++.

After a long time of searching , finally I found the solution to my problem in someone comment on Youtube .
This is the quotation of the comment :
"
if you didnt install C++ tools or it doesnt show up in your project menu: Go to control panel-> click change on microsoft visual studio -> click modify -> select c++ under languages " .
Thank you all :) ,,

Related

How come C++ project in Visual Studio Community 2015 only contain Universal Apps?

First, let me show you what I have..
Visual Studio Community 2015 installed with customization as follows..
Windows 10 Home (x64)
I tried creating C++ project with Win32 and standard C++11 support but I couldn't find any under "File > New > Project > Installed > Templates > Visual C++ > Windows". (Universal Windows App is the only option here ...)
I wish that the subpaths under my "File > New > Project > Installed > Templates > Visual C++ > Windows" have all three items that Visual C# and Basic already have underneath ("Universal", "Windows 8", "Classic Desktop"). To be more specific, I wish my "Visual C++ > Windows" to look like this..
I know that I can code Win32/C++ using "Universal Windows Apps" template but Win32 support is limited and it comes with bunch of .Net stuff that I don't need. Please don't get me wrong, I do love .Net and WPF and I myself was once a C# programmer (WinForm in particular) and I think of .Net to be the future of Windows development but right now I need to start with empty project with Win32/C++ support.
Is this problem confined to Community version only? (anyone tried VS2015 Pro/Ent ? please let me know)
EDIT:
Definitely can't be a solution to this problem.. but I found that I can circumvent the problem as below:
Here's how it works. Instead of searching for templates in "Installed > Visual C++ > Windows", I just go to "Installed > Samples > Visual C++ > Desktop" and Hurray! I see a Win32 "C++ UTF-8 Conversion Helpers" sample. I'll just use it to create projects and then discard anything unnecessary to make it empty. One hell of a pathetic approach just to get an empty C++ project :(
EDIT:
I posted the same question on Microsoft Developer Network. After another day of trials and errors, this is the furthest I went. Still no sign of "Classic Desktop" under C++
Finally, I found an answer to this problem....
I was so stupid to keep on launching vs-community using the wrong shortcut.
If you want to see all the C++ templates (including win32,MFC,ATL,...), you must use the shortcut "Visual Studio 2015" not the "Blend for Visual Studio 2015" (screenshot)
There are two shortcuts after you install Visual Studio Community 2015.
As you see, they each point to the different target.
So you need to use the shortcut that runs "devenv.exe" not the "Blend.exe".
But its strange that the first launch after the ISO installation launches "devenv.exe" but the web installer(vs_community.exe) launches "Blend.exe".
I guess I'm the only one here who made such a stupid mistake.
May be I should delete this question if not so many find it useful.
I had the same problem, however, the only way i was able to get win32 c++ was to install the c++ packages.

Visual Studio 2010/2012 Add-in Project Questions

I have already created a simple source code analyses tool for C/C++, but I wanted it to be an extension or tool for Visual Studio 2010 and 2012 editions. It is written completely in C++. For this reason I created it using "Create an Add-in using Visual C++/ATL" option. And then under "Choose Add-in Options", I have some problems. I don't know which one or ones to select. I want it to have a name and icon under Tools section, but on the other hand, my code analyzer can be used from command line too. If someone can advice me which option(s) to select there I would be glad.
My second question is this, when I have opened a source file in Visual Studio, and if I go to Tools -> MyAddin, and press it, I want it to do its job and analyze the code, and show the results in the output section below.
And my last question is that, if I have a C/C++ project with few files let's say, and if I right-click one of the files, I want to see my add-in and be able to execute the add-in from there, not to go always to Tools -> MyAddin. And also the same thing to work if I right-click the project, then it should analyze the all files and show the problems in the output section.
Please note that I have already created the source code analyzer tool in C++, and I have it as a DLL. I can also use it in Linux from terminal, and if I want I can also create a GUI for it, which I plan to do later. But I'm not that much experienced with Visual Studio, especially about add-ins, that's why I need your help. As you can see my first question is a kind of advice, but I think my second and third questions require some source code. I know that it is very hard for you to give me some help without seeing my code, but if you would help me somehow I would be glad.
For Visual Studio 2010 and 2012 you should consider using Extensions, not Add-Ins. It is a new technology introduced in Visual Studio 2010. Extensions come in form of a VSIX packages and are automatically installed in all applicable versions of Visual Studio. If you are not targeting Visual Studio version prior to 2010, I strongly recommend using extensions.
From this point of view, I will not answer any of your technical questions about Add-Ins. Here are a couple of links to start using extensions instead:
Anatomy of a VSIX Package
Building and publishing an extension for Visual Studio 2010
VSX FAQ
Walkthrough: Creating an Options Page
I think you will find valuable information on this topic here: Developing extension packages for Visual Studio 2005/2008/2010/2012 using C# with real-life samples

No Auto Complete Visual Studio 2010

Im using MS visual studio 2010 PRoofessional version , and in both languages I'm using (C++ and UnrealScript with Nfringe ) there seems to be no auto complete , also with the nfringe there is no auto indentation either .
I was wondering how to fix this?
Most probably you accidentally switched into low-impact IntelliSense mode by pressing
CTRL+ALT+SPACE Just hit CTRL+ALT+SPACE to go back to the IntelliSense mode.
Are you writing a totally unmanaged C++ dll? There is no intellisense support for CLI/C++ projects in VS 2010
I have actually problems with C++ and Intellisense since VC6...
We now use Whole Tomatoes "Visual Assist" and it repairs Intellisense. :-) This single feature is the money worth.
When you open the solution file, do you get a warning about being unable to open the IntelliSense database? If so, that's the reason—UnrealEngine intentionally has a directory with the same name as the IntelliSense database to prevent its creation (Visual Studio can't create a file if a directory of the same name already exists). The engine code base is so large that having IntelliSense enabled slows everything to a crawl when you're editing code.
I'm also using Unreal Engine, and I met the same problem before, the solution was set the dirs by myself in VS project setting.
Open the property window of ur game project(e.g UDKGame), navigate to "NMake", "Include Search Path", and fill the needed header search path there.
You may copy the path list from the output of UnrealBuildTool.
The values u set here is only used by Visual Studio's IntelliSense, so there's no need to worry about build error.
This only works for C++, I'm not sure what's wrong with Unreal Script. I just updated to Visual Studio 2010 and has not installed the new nFringe.
Hope this answer is not too late

Help with Eclipse shortcuts in Visual Studio C++ 2010

Is there a way to import Eclipse keyboard shortcuts into visual C++ ? I am being forced to use this in my work and I miss my shortcuts.
If not then can you guys help me figure out these shortucts
Quick Outline View of the code: C-O in eclipse
Type Hierarchy : C-S-T in eclipse
Call Hierarchy : C-H in eclipse
Find all the references of a word
QuickFix : C-1 in eclipse
Import all packages : C-S-O
Format all : C-S-F in eclipse
Move Lines : Alt+ Arrow
Thanks a lot!
I went through the same thing as you but on Visual Studio 2008. All I can say is that the experience was not fun. While I know Microsoft has upgraded the C++ intellisense in Visual Studio 2010, I don't know how much they improved the editor.
My recommendation is to just skip the headache and get Visual Assist. It provides all the Eclipse features you want and then some.
I have been using NavitageToTest, DPack and Productivity Power Tools, which works well. Using those two I have managed to configure these:
QuickFix , Ctrl + 1 ,- View.ShowSmartTag
Quick Access , Ctrl + 3 , View.QuickAccess
Open Type, Ctrl+Shift+T - DPack.Solution browser
Open Resource , Ctrl+Shift+R - DPack.File browser
Call Hierarchy , Ctrl+Alt+H , View.Callhiearchy
Quick Outline , Ctrl+O , DPack.Code browser.All
Previous member, Ctrl+Shift+Up, Dpack.CodeNavigator.Prev
Next member, Ctrl+Shift+Down, Dpack.CodeNavigator.Next
Jump to test file (and back), Ctrl+J, NavigateToTestFile

No MFC templates available for a new C++ project - Visual C++ Express

i've been googling before posting this but i havent been able to find anything on the topic.. yet i dont think its a very tricky one so please forgive for posting :o).
for a new job i am getting into C++, and following some tutorials. in particular one is about MFC, it shows how to create a project , selecting MFC application and so on. So, i installed Visual C++ Express 2010 on both a vista and a Win 7, and both time i had the same issue: when i go to new project , I have no "MFC" menu . some screenshots from that tutorial , and from some other on Visual C++ 2010 clearly show that it can be there. to be more specific, on corner left I have "installed templates" , then "Visual C++" and "CLR", Win32" and "General" , no MFC.
as these are "installed templates", i guess i should have to install it, but i found no clear indication on the topic; from what i found it should more or less be there from the beginning ... i also found a way to add MFC DLL through creating a Win32 application, but it doesnt seem its exactly the same thing .. I spent also some time on the menus of Visual C++ but did not find any clear way to add new templates like in Eclipse...
Well, I hope I made myself clear, i think this is pretty basic but if anyone could give me a hand on that one i'd greatly appreciate.
Cheers
Vincent
Visual Studio C++ Express does not support creating MFC applications.
If you don`t mind the leaking of unicode support, you can downlaod the visual studio 2013 express for desktop and install the free mfc mbcs supportfrom microsoft.com