Given few embedded C applications that use threads, files, network protocols and other such specificities of the OS and the compiler libaries, I am required to make them OS independent (atleast wrt popular OSes like Windows and Linux). I am thinking of using POCO, as POCO promises to be a cross-platform library, and would make the applications easily portable (in the best case, just a re-compile).One possibility is to "migrate" the OS-specific calls in the C applications to equivalent POCO library calls. Without really re-designing the C code, is this approach feasible? Ofcourse, this would mean instantiation of necessary objects at appropriate place in the C code, maybe affecting the 'understandability' of the C code... Has anybody tried similar approach? What could be the potential pitfalls of this?

ThanX.While it is true that the code is complex (the code base is few million lines of C code with atleast 20-25% code using OS specific calls), I thought it would be easier to "migrate" the OS-specific calls to use POCO rather than re-write the whole code...Using POCO from C code will mean having the calls placed in a CPP file, and having the function headers (containing the calls) enclosed in extern 'C'. Do you see any more complexities? Any architecture-related issues? Any issues with when to free objects?

You might encounter very-hard-to-solve (or perhaps unsolvable) linking issues if you mix up a large C project with a fairly large c++ library. I guess it would depend on what components you use. You can always try with simple uses of Foundation only, and go from there.