If you want to make your software (coding) portable, you have to look at established standards and good practices first. Then you start with your datasets, massaging them to conform. Then you consider making your sacred code inner loops kind of problem & solution libraries, or you leverage established libraries.
At this point your employer may ask, is there anything left. A good employer will ask, where did this take us. The point here attempts to be, think of what "portable" means, where exactly do you want to take it? Who else is there? Can they offer some assistance? "Portability" is a philosophical question before any programming in any particular language or any data design in any particular paradigm comes into play.

Please help.

I didn't find the right solution from the Internet.

References: http://www.eng-tips.com/viewthread.cfm?qid=392889

Digital Imaging Video