I am having trouble porting my project to win32. We rely heavily on the STL classes such as map, string, algorithm, set and vector. The MSVC docs say that old header files (e.g. iostream.h) cannot be used with the new STL headers (no .h e.g. iostream). When I try to build the project I get compilation errors because CommonC++ uses iostream.h.
Has anyone else run into this? What's the solution?
I've also tried using cygwin but I've run into a pthreads problem there. Apparently pthread_cond_t isn't implemented in the pthreads library that comes with cygwin. CommonC++ needs it.
Help!
Thanks,
Derek Crovo
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I don't think the patch posted addresses the problem mr. subsonic asked about. I have not applied this patch, but looking at it raw, it appears to fix a few minor details, such as the missing ssize_t, and the bizzare header <strstrea.h> on win32.
The problem is deeper. CommonC++ uses the v2 libraries. That is, the *old* iostream library. The new v3 libraries (default with current gcc as of, I think, 2.95.2 and default on msvc 6.0 and, maybe, earlier) are not supported by CommonC++. Some of the things that you have to change on windows to update to v3:
- most headers of the form <xxxx.h> need to be changed to <xxxx>. As subsonic says, if you include <iostream.h> you get the *old* iostream library, which is incompatible with <iostream> the *new* v3 library.
- update bits and pieces of the source, especially constructors, to fit with the new API's, which are significantly different.
- fix the buffering class in TCPStream (which appears buggy anyway)
- make the whole thing namespace aware (msvc puts all the v3 library in namespace std)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am having trouble porting my project to win32. We rely heavily on the STL classes such as map, string, algorithm, set and vector. The MSVC docs say that old header files (e.g. iostream.h) cannot be used with the new STL headers (no .h e.g. iostream). When I try to build the project I get compilation errors because CommonC++ uses iostream.h.
Has anyone else run into this? What's the solution?
I've also tried using cygwin but I've run into a pthreads problem there. Apparently pthread_cond_t isn't implemented in the pthreads library that comes with cygwin. CommonC++ needs it.
Help!
Thanks,
Derek Crovo
This is being worked on...
See
http://sourceforge.net/patch/?func=detailpatch&patch_id=103691&group_id=1523
for win32 compile fixes.
I don't think the patch posted addresses the problem mr. subsonic asked about. I have not applied this patch, but looking at it raw, it appears to fix a few minor details, such as the missing ssize_t, and the bizzare header <strstrea.h> on win32.
The problem is deeper. CommonC++ uses the v2 libraries. That is, the *old* iostream library. The new v3 libraries (default with current gcc as of, I think, 2.95.2 and default on msvc 6.0 and, maybe, earlier) are not supported by CommonC++. Some of the things that you have to change on windows to update to v3:
- most headers of the form <xxxx.h> need to be changed to <xxxx>. As subsonic says, if you include <iostream.h> you get the *old* iostream library, which is incompatible with <iostream> the *new* v3 library.
- update bits and pieces of the source, especially constructors, to fit with the new API's, which are significantly different.
- fix the buffering class in TCPStream (which appears buggy anyway)
- make the whole thing namespace aware (msvc puts all the v3 library in namespace std)