User forums > Help

Can't find crtdbg.h

<< < (3/4) > >>

TDragon:

--- Quote from: jmeuf on March 03, 2007, 11:52:59 pm ---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.

--- End quote ---
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.

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), maybe we can figure out the problem.

Biplab:
TDragon have already mentioned that STL is a part of every modern compiler. STL comes with VC, too. :)

To use it, provide the name of STL class with #include minus the .h

Try the following code and it should work perfectly in MSVC without adding any external STL package.


--- Code: ---#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;
}
--- End code ---

The same code would also compile perfectly in GCC. :)

jmeuf:

--- Quote ---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).
--- End quote ---

Ok. I understand that 'playing around' with the stl is not a good idea. I deduce that the VC++ Toolkit 2003 is 'too lite'. 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?


--- Quote ---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)
--- End quote ---

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. It will be difficult to split it as it is already composed of 5/6 .cpp sources files and associated headers + resource file.


--- Quote ---The same code would also compile perfectly in GCC.
--- End quote ---

I'm used to work under gcc (MinGW). Unfortunately the snippets of code I want to reuse are only compilable under MSVC compiler... (remember the title of that thread  :D). I have no other choice than using an MS tool  :x. However you are right: I have compiled this code under MinGW without any problem  :lol:

TDragon:

--- Quote from: jmeuf on March 04, 2007, 10:08:52 pm ---I deduce that the VC++ Toolkit 2003 is 'too lite'.

--- End quote ---
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.


--- Quote ---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?

--- End quote ---
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.


--- Quote ---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.
...
Unfortunately the snippets of code I want to reuse are only compilable under MSVC compiler...

--- End quote ---
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.

jmeuf:

--- Quote ---But add the Microsoft Platform SDK and the sky's the limit.
--- End quote ---

My environment includes:
  - C:B nightly
  - MinGW 345
  - VC++ Toolkit 2003
  - Platform SDK
... but I still don't see the sky !! Do you mean that the behold library is in pSDK rather than VCT2003?
I have all installed the full set following this wiki:

http://wiki.codeblocks.org/index.php?title=Integrating_Microsoft_Visual_Toolkit_2003_with_Code::Blocks_IDE


--- Quote ---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.
--- End quote ---

In fact, behind this tuto lies a huge library that I have started to use to develop a complete window app. I am very happy with it and would really continue to use it. For more details, you can have a look here:

http://www.relisoft.com/rswl.html

Then, you will get the full picture of my situation !

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version