intellisense of vs2017 is slow with boost library and resharper c++ plugin - c++

I use visual studio 2017 for my c++ projects. I am also fan with resharper plugin which has a similar style like Jetbrains Clion.
However, when a huge library is included, like Boost C++ Library into projects. The intellisense pops out too slowly, no matter resharper intellisense or vs native intellisense. Furthermore, sometimes vs2017 may misjudge incomplete input as errors for a time.
I have already known some seemly useless method mentioned in official tutorial and my computer is good enough of i7 and high volume memory/ssd no lack of machine performance.
So, anyone can help to increment performance for reshaper c++ in vs2017. Like switch some options like tool or project properties.

Related

Creating a portable, cross-platform, open-source C++ GUI application that works out of the box?

I've been looking around to see how I'd accomplish that which is described in the title. That is, I'd like to create a C++ GUI application that:
is portable (no installer)
is cross-platform (Qt solves this)
is open source
works out of the box (i.e. no C++ redistributable installs needed)
I've run into several issues trying to accomplish this. I've narrowed it down to using Qt and NOT using the Visual Studio compiler. Let me explain.
Using Qt would fulfill the cross-platform requirement; it's also highly acclaimed in regard to C++ GUI applications. The issue lies with portability and not having a ton of dependency packages to install before being able to use the application. My goal would be for someone to download a .zip file containing an .exe (and I'd be willing to include other support files e.g. DLLs if necessary) and be able to extract and run that exe out of the box without having to do anything else.
And here's another kicker: as much as I'd like to use Visual Studio (with the Qt Visual Studio Add-in), it just doesn't seem feasible given my requirements. This post covers my issues pretty nicely. Simply put, if I use the Visual Studio compiler, I'd need to either create an installer (no longer a portable app), redistribute some Microsoft DLLs with the app (possible licensing and redist issues here?), or statically link the Visual C++ libraries into the executable (frowned upon technique).
Is there any way to be able to use Visual Studio and fulfill the requirements listed above? Visual Studio is just too fully-featured to pass up. If it's not possible, I think the only other alternatives would be to use a different IDE and/or compiler. For example, I could use QtCreator with MinGW, but then I'd be losing out on some awesome VS debugging features.
My main questions:
Is there any way I can fulfill the requirements above and still use Visual Studio?
Am I wrong about QtCreator not being as fully functional as Visual Studio?
What would be the best way to approach fulfilling my application requirements?
Thanks in advance.
I think your best bet would be to use QT with the MinGW environment. It allows you to create a portable application that supplies runtime DLLs by itself, with added bonus of being completely open source. The QT online installer gives you the option to install the complete MinGW system, and it will work out of the box, not much setup needed.
You could still use Visual Studio for development; there even is a QT plugin for it (I am not sure if VS2015 is supported, but if not that should only take some time).
QTCreator is actually a quite nice IDE, but it cannot stand up to Visual Studio. It is obviously optimized to cater to the needs of QT programmers, but I found that it is quite clunky from time to time. If your project is small it could be a viable choice, but since Visual Studio 2015 Community is basically free I would opt for that. The VS plugin will still use QTCreator's GUI editor though (which is really good)

Visual C++ 2010 native Intellisense settings

So, I started programming in C++ moving from Java, Eclipse IDE. I use VS 2010 proffessional, I have it for free from DreamSpark.
However, I am very unhappy with its Intellisense, beeing far far worse than Eclipse (its C++ version) has. But almost everywhere on the internet I read that VS has great, superior Intellisense for native C++. So I want to ask, is there any way, some settings to change to make VS intellisense behave simmiliar to Eclipse? Or is there any other functionality in VS intellisense that compensate that?
To be exact, Eclipse intellisense does much better job guessing what object I want to create, suggests includes, generate keywords, generate few common for cycles etc...
I would not even as this question, but I found somuch possitive feedback on native C++ VS 2010 intellisense, so I have feeling I am doing something wrong... Thanks.
If you are writing managed C++ (C++/CLI) there is a post explaining that intellisense is not currently implemented here
As for alternatives you may like visual assist X.
This question has also been answered before on Stackoverflow. Please see below for some alternative answers and suggestions:
No IntelliSense for C++/CLI in Visual Studio 2010?

Using a pure C++ compiler versus Visual C++

I searched around for the answers to these questions, but I have had little luck. So, I thought I would post them here to get some clarification. If this is a duplicate, please let me know, and I will close this.
Okay, with that said, I would like to begin learning C++. I come from a C# background and I have a great respect for Visual Studio and what it can do. Now, my question is. How well does Visual Studio's compiler work for C++ as opposed to a non-Microsoft version (such as MinGW)?
My thing is this. I have nothing wrong with Microsoft, but I would really like to learn C++ in a "pure" form and not scewed by any particular implementation. How reliant is Visual C++ on the .NET Framework? Can a "pure" C++ application be created through Visual Studio without any .NET usage or overhead? Does the Visual Studio compiler compile C++ into CIL like it does with C#/VB, or does it compile it all the way down as others do?
Thanks for any help anyone can provide!
The Visual C++ compiler will compile C++ code into standalone EXEs that have nothing to do with the .NET framework.
The only way to get the .NET baggage thrown in is to compile the C++ as "managed".
If you create a new project (File|New|New Project) Then choose "Win32" from the Visual C++ submenu in the project types and choose "Win32 Console Application" Visual studio will create a simple project with a couple of source files that will compile to a little executable.
Most of the time, Visual C++ is very similar to other compilers. Avoid #pragmas, microsoft libraries (MFC, ATL) and you should be fine.
Edit (thanks Cheeso) - Documentation of where Visual C++ diverges from standard.
In general I would advise using boost libraries for threads and networking because they work on many platforms (i.e linux). Also if your code can compile in GCC and Visual Studio then you are doing a good job keeping it portable.
The most recent versions of VC++ have become significantly more compliant to the C++ standard, so it's not really an issue to write "pure" C++ using Visual Studio, presuming that you stay out of the Windows API, COM+ and ATL. In fact, the documentation with Visual Studio is very rich, with details on the standard libraries and the STL, so it can help you learn a great deal. It can't teach you everything, but it's certainly loaded up with a wealth of information that is portable to any compiler and it is very easily accessbible inside the IDE.
If you create a new solution you should choose new Win32 Project, or Win32 Console Application, and check the 'Empty Project' option. Then you can add a main.cpp file, and add your standard C++ code.
If you like Visual Studio, go ahead and use it to learn C++ -- I haven't used the very latest version, but even the previous one was pretty standards-compliant, C++-wise, and I assume the latest one can only have gotten better. You can have many different kinds of project in Visual Studio, including "console apps", which are the "plain vanilla" kind you could make on any platform, and also many other kinds, such as, windows apps using the good old win32 api, ones made with MFC or other frameworks older than .NET, .NET ones using "managed code", etc.
Just make sure you always work in a "console app" project, and you'll be operating pretty closely to how you would be on other platforms and/or with other C++ IDEs.
If you limit yourself to writing ANSI C++ compliant code then what you write in VS will work in other compilers, until you have to interact with a graphic interface or IO. Then you need to make certain that you are using something that is portable, such as OpenGL, and not DirectX.
To set your project the steps here may be useful:
http://bytes.com/topic/net/answers/447572-strict-ansi-c
Microsoft Visual Studio 2005 comes with a very good, C++98 standard compliant pure C++ compiler. If you are interested in pure C++, don't forget to disable language extensions in project settings and you are good to go. Nobody is going to force you to use .NET framework, MFC or anyting like that. Just pure core C++ language and C++ standard library.
Of course, just like any other compiler, it has known non-compliance issues, but in general it is, again, surprisingly good. Older versions of their compiler (MS VS 6.0 specifically) suffered from many non-compliance problems and could not even compile its own header files with language extensions disabled. In 2005 version they fixed a lot of these issues.
After creating a standard Win32 project, you can turn up the compliance a bit more. On the project properties sheet, there's a C/C++ category, with a Language entry. This lists a number of cases where VC++ can differ from the standard. Here, you'd want to turn OFF language extensions, and turn ON "wchar_t as built-in type", "for-loop conformance" and "RTTI support".

Visual C++ 2008 Express Or Eclipse Ganymede With CDT

I'm learning C++, and I want to know from those who are very good developers now: What is the best IDE, Visual C++ 2008 Express or Eclipse Ganymede with CDT? Remember that I'm using Microsoft Windows Vista Ultimate. Thanks!
The book that I'm reading is from Deitel: C++ How to Program, 5/e, because I don't know if the code of the book supports Microsoft Visual C++ 2008 Express.
I'm using both regularly now.
Visual studio is easier and more user friendly. I have issues with it though. They force you to do a number of things for reasons the benefit Microsoft and not you. It's free so you can't complain that much. Support is non existent but there's google for help.
Eclipse Gallileo does some difficult things startlingly well, but does some simple stuff startlingly badly. Such as when you compile if there's an error you get no visual indication. You have to open the problems window to see the errors. DOH! Eclipse is nearly as good as visual studio overall and is one of the best when using linux. The new version of the debugger has some very nice new features as well. Support is poor to non existent but there's google for help.
I tried codeblocks. The support was not very good to rude. I found it difficult to do anything serious with.
If you're working on Windows, MSVC++ 2008 Express is probably the one to go with, since it's the platform's native compiler. If you don't have any experience with Eclipse already, definitely go with MSVC. I've found Eclipse to be very counter-intuitive, but that's me, you may love it.
I use codeblocks :) I like it a lot actually. Its interface is really easy to use.
I am having issues with MSVS right now which I will be posting a question about here in a few minutes.
Either will do you fine at this stage, but on balance I think you will find VS 2008 Express a little more straightforward unless you have much Eclipse experience.
That said, once you begin developing your OS you may find that you need to upgrade to the full (non-Express) version.
I use both Visual Studio 2005 Pro (at work) and Eclipse CDT (for personal projects).
I do prefer to use Eclipse because I program meanly Qt applications on Windows with it. The Qt integration module is really good (and available freely at http://qt.nokia.com/).
Once you are there, you could give a try also to Qt's lightweight IDE: Qt Creator.
If you are going to do C++ GUI programming, I think you should definitively go with Eclipse CDT and the Qt Integration plugin. I've programmed (and suffering) several years of MFC before learning Qt and I will never go back!
Hope it helps!

Static-code analyzer: unmanaged C++ Visual Studio 2008

I develop commercial unmanaged C++ app on Visual Studio 2008, and I want to add a static-code analysis tool.
Any recommendations?
I think it would be real nice if the tool can be integrated into MSVC.
I'm thinking about PC-Lint + Visual Lint
However, I have been taking a hard look at Coverity, Understand, and Klockwork as well.
Price isnt really the issue. I want opinions from people who actually used the tool for unmanaged C++ on MSVC, and they just absolutely loved it.
Lastly, VSTS and Intel Parallel Studio now also offer static code analysis. Nice~
Note: related post suggest Coverity is the best (?) (see last 2 posts)
Beyond all those you mentioned, VS Team Developer edition comes bundled with a nice static analysis tool called prefast. Its (obviously..) well integrated into the IDE, and accessible via the menus.
Its in fact a public release of an MS internal tool - a thin version of a tool called Prefix they run on their builds. Personally, when I faced the same decision, prefast sufficed.
I work for RedLizard building Goanna, a C++ static analysis plugin for Visual Studio. Its focus is on desktop use by a programmer. You can run it on individual files, just as you do the compiler, and it can give you results quickly.
There is a trial available. Right-click a file, select Run Goanna, and the results appear in the Visual Studio warnings list.
You can try CppDepend, a pretty complete c and c++ static analyzer, well integrated with VS 2008, 2010, 2012, 2013 and 2015.
I just started using cppcheck which I like very much due to the low noise.
Although it does not integrate directly with Visual Studio 2008, VS can be customized and you should be able to integrate it directly into the IDE.
I use PVS-Studio static code analyzer.
This static code analyzer good integrated with Visual Studio 2005, 2008, 2010, 2012, 2013.
It has many additional features:
Verification of files which were recently modified several days ago;
Verification of files by their filenames from within the text file
list;
version control systems integration; ability to operate fro m command line
interface;
«False Alarms» marking; saving and loading of analysis
results;
utilizing all available cores and processors;
etc...