Saturday, May 22, 2010

What kind of system software would be needed to migrate the c++ code from windows to unix?

Assume that you are a software doveloper and a client comes to you with a software product doveleoped using c++ for windows and asks you to run that product to unix plateform?


what are the steps you follow?


is there any system software for that?


is there any manual work also for that?

What kind of system software would be needed to migrate the c++ code from windows to unix?
Well that really depends on what the program does. Of course the minimum would be an editor and a compiler on the the Unix machine.





If it is a GUI program, well you are going to have to rewrite it in a Unix GUI, so you would have learn that and do it.





Also if you using any extensions to the C++ language (and if you are using Microsoft you probably are) you are going to have to convert those. And then there is going to be some differences in system calls and such that will have to be ported.





And then there is the third party libraries. If you are using some you will need to either get ones that can run on Unix or change to some other libraries or rewrite the code. Depending on the GUI used this might also apply to the GUI.





Going from Unix to Windows tends to be easier, because Unix programs unusually stick with straight C++, the other way around can be much harder. If you can get your program compiling under GNU C++ on Windows you would be a lot closer. This isn't easier then doing it right on Unix except that you would be more use to the editors and such.





Also when you transfer you code to Unix you need to run it through dos2unix to fix up the fact that Windows uses CR/LF for end of line, and Unix uses LF.


No comments:

Post a Comment