| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 14600 | 2002-01-13 06:22:00 | BolrandC v5.0 and C++ S.T.L. | Guest (0) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 31028 | 2002-01-13 06:22:00 | I have Borland C++ v5.0 and I am trying to write C++ programs which use the C++ 'Standard Template Library' (STL). Borland C++ comes with its very own home grown version, but I want to use the standard library so that my source code can by ported to a different compiler (eg: gcc in linux in particular). I have seen evidence that this is most likely possible but if I try something like #include <string> the compiler comes up with a vast amount of errors (in fact, infinite often enough - obviously some circular reference). Can anyone please tell me how to get this to work for me. Thankyou for any response. |
Guest (0) | ||
| 31029 | 2002-01-13 13:30:00 | Dont know much!! But yeah have a look into your environment options and see your library paths and i guess you can change it to include diff header files. I guess you know all this but Apart from this i have no other technical info on it. |
Guest (0) | ||
| 31030 | 2002-01-14 03:58:00 | I suspect that there will be duplicate names in the different libraries. If both libraries are around, there will be problems. #include <blah.h> looks in the default library path first. #include 'blah.h' looks in current (source) directory first. But I think that most of the library files will contain #include files , so you're probably getting recursive calls, or calls to wrong files. And lots of error messages. Don't like C or C++ myself, but the nearest book I can find here says that in Borland C++, you set the library path in Project/Directories. Is that any help? |
Guest (0) | ||
| 31031 | 2002-01-14 05:59:00 | The reason for the recursive compilation error is because 'string' (no extension) calls another header file 'string.h' which is the borlandC++ version. This however is actually a little irrelevent, my most pending problem (that I have experienced so far) is that I need to use the STL's List class. This should be found in the 'List' file (no extension), however Borland C++ doesn't seem to like me trying to include that. I don't remember exactly, but I don't think the List file exists in the usual bc5\include directory, but is in a directory named 'obsolete' - of course, trying to include any files from within that directory doesn't just work nicely as you might hope. So thanks for the help so far, but I'm still stuck. |
Guest (0) | ||
| 31032 | 2002-01-15 05:46:00 | Mmm. Borland stuff is good -- I love Turbo Pascal -- but standards are only useful if people do not 'improve' them. You might change to the DJGPP compiler. That will do your MS stuff, and the code will be transportable to gcc. You can get it from the Simtel archive (in the gnu/djgpp/v2gnu directory). One of the info files says that there is an IDE available for it. |
Guest (0) | ||
| 31033 | 2002-01-16 09:25:00 | Thanks guys, I'll have a look into this other compiler, but I prefer to stick with Borland, I own it so perhaps I could try Borland for help, .........(:<).......... | Guest (0) | ||
| 1 | |||||