What the main reason to use stlport library in the code? - c++

I saw someone use stlport in visual c++, but I think standard c++ library is included with visual c++ already? what's the advantage to use stlport? is stlport free?

Most likely either the code was written before visual c++ had a full implementation (for example in VC6) or the code is cross platform and the author wanted to make sure the same library was there on each platform. (That's not so much of an issue recently but even 2 or 3 years ago there were much more substantial differences from the standard in each implementation)

Related

Is it possible to use different compiler versions in visual studio?

There is a library (.lib, we don't have the source code) which we use to communicate with a hardware device which was compiled using
_MSC_VER 1600
I wish to use a newer c++ standard while using this library. When I change it to the next higher available in VS studio I get the message that 1600 does not match 1900. Is there a way to use a newer c++ standard and continue the use of the old library?
The company which provided the files hasn't updated the drivers in years.
I found on SE various answers to this topic but most are on expert level on c++ compilation/linking. I had problems to understand them.
EDIT: It is not a DLL but a .lib file. This may be explain wy I could not understand this question and answer. Another similar answer is this one: C++ MSC_VER mismatch with Third Party library
. Does this mean that the answer is "No, it is not possible. You have to use an old compiler version?"

Does C++ STL or TR1(not boost::tr1) work only on Windows?

I was thinking STL was a standard implementation, though TR1 may not be. But does the platform matter? I was thinking it would work on Windows/Linux/Unix/Mac. I have people saying it wont work on anything other than Windows.
Please let me know.
-TIA
No, the STL ( not to be confused with the C++ standard library ) was developed by Alexander Stepanov when working for HP and Silicon Graphics. Much of the STL later was included into the C++ standard library, hence sometimes the STL and the templated containers in the C++ standard library are confused.
The second STL implementation (SGI) was designed to work with any standard complient C++ compiler, though IIRC not the early Microsoft 'C++' compilers due to lack of required features. (I seem to recall trying to play with it in the late 90s). The C++ standard library now requires some compiler intrinsics so there is no 'standard implementation' possible. (IIRC these are for atomic operations, but edit or comment if you know better)
So the implementation of the C++ standard library which ships with Visual Studio will only work with 'Windows'*, and probably only with Microsoft's C++ compiler. Other implementations will work with other compilers and on other platforms.
*Visual studio C++ can cross compile to other variants of Windows, so a version of the standard library for Windows 10 x64 will not work on Windows 7 ARM embedded.

How to use C++11 threading with Visual Studio

Before I start I want to explain that I am a novice and that it's highly possible that I've missed something simple or that there's something simple that I just don't know about.
Using visual studio I wanted to get a bit of threading practice in but I can't get it to include at the top of my code. I know that is new to C++11 but I'm not sure if that's enabled for Visual Studio 2010 or if it isn't I'm not sure how I would go about doing that.
Here is a screenshot of my code:
You cannot: C++11's Thread support library is not supported by the implementation of the C++ Standard Library shipped with VS2010. You should upgrade to VS2012 if you want to use it.
Alternatively, you could use Boost.Thread, which served as an inspiration for C++11's Standard Thread support library.
As a further option, you could consider purchasing the Just.Thread library, which provides a complete implementation and is available for VS2010 as well.

Intel's C++ compiler for Windows

It supposedly integrates with Visual Studio, but does it come with it's own C++ standard library? Or does it use the one provided by VC++?
At least the last time I checked, it used the one that came with VC++. I believe you can buy the Dinkumware library for it separately, if you really want to (but Dinkumware supplies Microsoft's library, so you're getting a different version of the same, not something radically different).

visual c++ and C++ builder

Can C++builder compile any c++ source files.
I don't have a good knowledge in c++. but i have some experience in delphi.
I like to use c++ but confused which one to use
I know that cbuilder has vcl , easy to develop ,easy for delphi developer
But my problem is can it compile any c++ files (vc++ and other source files).
is it compatible with vc++ (excluding MFC and VCL). Can i use any APIs with c++builder
You'll find C++ Builder very comfy coming from Delphi if you don't care about MFC or .NET via C++/CLI etc and just want native C++ then either will work for you. Visual Studio 2010 supports a lot of the new C++0x features which is pretty nice, although they don't have variadic templates yet. I'm not sure how much of C++0x is in C++ Builder as yet but that could be worth looking into as a deciding factor.
It should be able to compile any standards conforming code. If the code uses extensions that another compiler provides, it will more than likely have problems. VC++ has quite a few extensions that are on by default and so someone using that compiler might use them with out realizing what is going on(the same applies to G++ the other major C++ compiler out there.)
In my experience, C++Builder's support for more advanced C++ code is limited. For example, many of Boost's libraries are unsupported in C++Builder, and I've often had to modify other open source libraries to get them to build properly in C++Builder (due to various bugs or limitations in C++Builder's compiler). Simpler C++ code can work without any problems.
So, depending on what C++ libraries / source files / APIs you're wanting to use, getting them to work in C++Builder may be very straightforward, or it may take significant work.
You can download a free version of C++ Builder at www.embarcadero.com. With that, you can test your libraries for compatibility.