What can I do ? (...change your compiler. Nann, I was joking!!) :lol:Why not? Your project obviously is based on the Microsoft compiler suite (there you can find the "crtdbg.h"). But never-ever try to mix those header files (e.g. copy the MS one to the MinGW/GCC include folder...)
Is there any other compiler such DevC++ that can handle that ?
I need to link the STL (Standard Template Library). Does anybody know where to find it?For any modern compiler, STL is part of the included Standard C++ Library. For GCC and MSVC, one need only include the appropriate header files for the classes one wishes to use; no additional libraries need to be linked in.
I am trying to compile a source library which needs crtdbg.hhttp://dotnet.di.unipi.it/Content/sscli/docs/doxygen/pal/crtdbg_8h-source.html
C::B can't find it and I checked that it is not included in the 'include' folder.
For any modern compiler, STL is part of the included Standard C++ Library. For GCC and MSVC, one need only include the appropriate header files for the classes one wishes to use; no additional libraries need to be linked in.
I downloaded the headers of the stl v3.3 from the SGI web site: http://www.sgi.com/tech/stl/download.html and copied in my 'include' folder.Definitely not a good idea; as I said, the STL is a part of the Standard C++ Library included with every modern compiler. Overwriting headers that are included with your compiler is a sure recipe for disaster.
#include <iostream>
#include <string>
#include <vector>
using namespace std;
int main(void)
{
string a, b;
a.assign("Hello");
b.assign("World");
cout << a + " " + b << endl;
// Another example with vector
vector<string> V;
V.push_back(a);
V.push_back(b);
for (int i = 0; i < (int) V.size(); ++i)
cout << V[i] << " ";
cin >> b;
return 0;
}
I must admit to never having used the Visual C++ 2003 Toolkit (which it appears you're using), but I do use Visual C++ 2005 (Standard) on a regular basis. I highly recommend you completely uninstall the VCTK (making sure whichever directory you installed it in is completely deleted) and then reinstall it (or, better yet, install MinGW/GCC instead).
If you could then submit a sample of code that gives you errors along with the command line C::B uses in compiling it (make sure Settings->Compiler and debugger->Other settings->Compiler logging is set to Full command line)
The same code would also compile perfectly in GCC.
I deduce that the VC++ Toolkit 2003 is 'too lite'.That depends on what your intended use is. With the toolkit by itself, I believe you're limited to standard C and C++ based console apps. But add the Microsoft Platform SDK and the sky's the limit.
I have the opportunity to use the Visual Studio 2005 Express Edition, which is a free version of Visual Studio 2005. Do you think that it is a good idea to try it first?Yes, though not necessarily through Code::Blocks. Visual Studio is a competitor with C::B, on a usability basis if not a monetary one, so check out the competition and decide what fits your needs. I use both C::B and Visual Studio regularly, professionally and as a hobby, because each is better at certain things than the other.
The code I'm trying to compile is not mine but provided as tutorial. It has been developped under MSVC compiler, I guess the same as yours.If this code is intended only to be learned from, I would strongly recommend you drop it (if possible) and find a tutorial that is compiler-agnostic. Learning to write code that only works on one compiler (and is therefore not standards compliant) will only hurt you in the long run. If you truly have no alternative to using this code, then you'll still need to provide further details before you can be helped.
...
Unfortunately the snippets of code I want to reuse are only compilable under MSVC compiler...
But add the Microsoft Platform SDK and the sky's the limit.
If this code is intended only to be learned from, I would strongly recommend you drop it (if possible) and find a tutorial that is compiler-agnostic.